Fn_chol


Functions

template<typename eT , typename T1 >
bool chol (Mat< eT > &out, const Base< eT, T1 > &X)
template<typename eT , typename T1 >
Mat< eT > chol (const Base< eT, T1 > &X)

Function Documentation

template<typename eT , typename T1 >
bool chol ( Mat< eT > &  out,
const Base< eT, T1 > &  X 
) [inline]

Definition at line 23 of file fn_chol.hpp.

References auxlib::chol(), and Base< elem_type, derived >::get_ref().

Referenced by chol().

00024   {
00025   arma_extra_debug_sigprint();
00026   
00027   const unwrap<T1> tmp(X.get_ref());
00028   arma_debug_check( !tmp.M.is_square(), "chol(): given matrix is not square");
00029   
00030   return auxlib::chol(out, tmp.M);
00031   }

template<typename eT , typename T1 >
Mat<eT> chol ( const Base< eT, T1 > &  X  )  [inline]

Definition at line 38 of file fn_chol.hpp.

References arma_print(), and chol().

00039   {
00040   arma_extra_debug_sigprint();
00041   
00042   Mat<eT> out;
00043   
00044   const bool ok = chol(out, X);
00045   if(ok == false)
00046     {
00047     arma_print("chol(): matrix factorisation failed");
00048     }
00049   
00050   return out;
00051   }