$search
00001 // Copyright (C) 2011 NICTA (www.nicta.com.au) 00002 // Copyright (C) 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 00019 template<typename T1, typename T2, typename T3> 00020 inline 00021 bool 00022 syl 00023 ( 00024 Mat <typename T1::elem_type> & out, 00025 const Base<typename T1::elem_type,T1>& in_A, 00026 const Base<typename T1::elem_type,T2>& in_B, 00027 const Base<typename T1::elem_type,T3>& in_C, 00028 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 00029 ) 00030 { 00031 arma_extra_debug_sigprint(); 00032 arma_ignore(junk); 00033 00034 typedef typename T1::elem_type eT; 00035 00036 const unwrap_check<T1> tmp_A(in_A.get_ref(), out); 00037 const unwrap_check<T2> tmp_B(in_B.get_ref(), out); 00038 const unwrap_check<T3> tmp_C(in_C.get_ref(), out); 00039 00040 const Mat<eT>& A = tmp_A.M; 00041 const Mat<eT>& B = tmp_B.M; 00042 const Mat<eT>& C = tmp_C.M; 00043 00044 const bool status = auxlib::syl(out, A, B, C); 00045 00046 if(status == false) 00047 { 00048 out.reset(); 00049 arma_bad("syl(): equation appears to be singular", false); 00050 } 00051 00052 return false; 00053 } 00054 00055 00056 00057 template<typename T1, typename T2, typename T3> 00058 inline 00059 Mat<typename T1::elem_type> 00060 syl 00061 ( 00062 const Base<typename T1::elem_type,T1>& in_A, 00063 const Base<typename T1::elem_type,T2>& in_B, 00064 const Base<typename T1::elem_type,T3>& in_C, 00065 const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 00066 ) 00067 { 00068 arma_extra_debug_sigprint(); 00069 arma_ignore(junk); 00070 00071 typedef typename T1::elem_type eT; 00072 00073 Mat<eT> out; 00074 const bool status = syl(out, in_A, in_B, in_C); 00075 00076 if(status == false) 00077 { 00078 out.reset(); 00079 arma_bad("syl(): equation appears to be singular"); 00080 } 00081 00082 return out; 00083 } 00084 00085 00086