fn_solve.hpp
Go to the documentation of this file.
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 
00026 
00027 template<typename T1, typename T2>
00028 inline
00029 const Glue<T1, T2, glue_solve>
00030 solve
00031   (
00032   const Base<typename T1::elem_type,T1>& A,
00033   const Base<typename T1::elem_type,T2>& B,
00034   const bool slow = false,
00035   const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
00036   )
00037   {
00038   arma_extra_debug_sigprint();
00039   arma_ignore(junk);
00040   
00041   return Glue<T1, T2, glue_solve>(A.get_ref(), B.get_ref(), ((slow == false) ? 0 : 1) );
00042   }
00043 
00044 
00045 
00046 template<typename T1, typename T2>
00047 inline
00048 const Glue<T1, T2, glue_solve_tr>
00049 solve
00050   (
00051   const Op<T1, op_trimat>& A,
00052   const Base<typename T1::elem_type,T2>& B,
00053   const bool slow = false,
00054   const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
00055   )
00056   {
00057   arma_extra_debug_sigprint();
00058   arma_ignore(slow);
00059   arma_ignore(junk);
00060   
00061   return Glue<T1, T2, glue_solve_tr>(A.m, B.get_ref(), A.aux_uword_a);
00062   }
00063 
00064 
00065 
00066 template<typename T1, typename T2>
00067 inline
00068 bool
00069 solve
00070   (
00071          Mat<typename T1::elem_type>&    out,
00072   const Base<typename T1::elem_type,T1>& A,
00073   const Base<typename T1::elem_type,T2>& B,
00074   const bool slow = false,
00075   const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0
00076   )
00077   {
00078   arma_extra_debug_sigprint();
00079   arma_ignore(junk);
00080   
00081   try
00082     {
00083     out = solve( A.get_ref(), B.get_ref(), slow );
00084     }
00085   catch(std::runtime_error&)
00086     {
00087     return false;
00088     }
00089   
00090   return true;
00091   }
00092 
00093 
00094 


armadillo_matrix
Author(s): Conrad Sanderson - NICTA (www.nicta.com.au), (Wrapper by Sjoerd van den Dries)
autogenerated on Tue Jan 7 2014 11:42:04