$search
00001 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) 00002 // Copyright (C) 2008-2011 Conrad Sanderson 00003 // 00004 // This file is part of the Armadillo C++ library. 00005 // It is provided without any warranty of fitness 00006 // for any purpose. You can redistribute this file 00007 // and/or modify it under the terms of the GNU 00008 // Lesser General Public License (LGPL) as published 00009 // by the Free Software Foundation, either version 3 00010 // of the License or (at your option) any later version. 00011 // (see http://www.opensource.org/licenses for more info) 00012 00013 00016 00017 00018 00019 arma_inline 00020 const Gen<mat::elem_type, gen_ones_diag> 00021 eye(const uword n_rows, const uword n_cols) 00022 { 00023 arma_extra_debug_sigprint(); 00024 00025 return Gen<mat::elem_type, gen_ones_diag>(n_rows, n_cols); 00026 } 00027 00028 00029 00030 template<typename mat_type> 00031 arma_inline 00032 const Gen<typename mat_type::elem_type, gen_ones_diag> 00033 eye(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only<mat_type>::result* junk = 0) 00034 { 00035 arma_extra_debug_sigprint(); 00036 arma_ignore(junk); 00037 00038 return Gen<typename mat_type::elem_type, gen_ones_diag>(n_rows, n_cols); 00039 } 00040 00041 00042