$search
00001 // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) 00002 // Copyright (C) 2009-2010 Conrad Sanderson 00003 // Copyright (C) 2009-2010 Dimitrios Bouzas 00004 // 00005 // This file is part of the Armadillo C++ library. 00006 // It is provided without any warranty of fitness 00007 // for any purpose. You can redistribute this file 00008 // and/or modify it under the terms of the GNU 00009 // Lesser General Public License (LGPL) as published 00010 // by the Free Software Foundation, either version 3 00011 // of the License or (at your option) any later version. 00012 // (see http://www.opensource.org/licenses for more info) 00013 00014 00017 00018 00019 00020 template<typename T1> 00021 inline 00022 const Op<T1, op_cor> 00023 cor(const Base<typename T1::elem_type,T1>& X, const uword norm_type = 0) 00024 { 00025 arma_extra_debug_sigprint(); 00026 00027 arma_debug_check( (norm_type > 1), "cor(): norm_type must be 0 or 1"); 00028 00029 return Op<T1, op_cor>(X.get_ref(), norm_type, 0); 00030 } 00031 00032 00033 00034 template<typename T1, typename T2> 00035 inline 00036 const Glue<T1,T2,glue_cor> 00037 cor(const Base<typename T1::elem_type,T1>& A, const Base<typename T1::elem_type,T2>& B, const uword norm_type = 0) 00038 { 00039 arma_extra_debug_sigprint(); 00040 00041 arma_debug_check( (norm_type > 1), "cor(): norm_type must be 0 or 1"); 00042 00043 return Glue<T1, T2, glue_cor>(A.get_ref(), B.get_ref(), norm_type); 00044 } 00045 00046 00047