$search
00001 // Copyright (C) 2009-2011 NICTA (www.nicta.com.au) 00002 // Copyright (C) 2009-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 template<typename T1> 00020 inline 00021 const Op<T1, op_chol> 00022 chol 00023 ( 00024 const Base<typename T1::elem_type,T1>& X, 00025 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 00026 ) 00027 { 00028 arma_extra_debug_sigprint(); 00029 arma_ignore(junk); 00030 00031 return Op<T1, op_chol>(X.get_ref()); 00032 } 00033 00034 00035 00036 template<typename T1> 00037 inline 00038 bool 00039 chol 00040 ( 00041 Mat<typename T1::elem_type>& out, 00042 const Base<typename T1::elem_type,T1>& X, 00043 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 00044 ) 00045 { 00046 arma_extra_debug_sigprint(); 00047 arma_ignore(junk); 00048 00049 try 00050 { 00051 out = chol(X); 00052 } 00053 catch(std::runtime_error&) 00054 { 00055 return false; 00056 } 00057 00058 return true; 00059 } 00060 00061 00062