Functions | |
template<typename T1 > | |
arma_warn_unused T1::elem_type | det (const Base< typename T1::elem_type, T1 > &X, const typename arma_blas_type_only< typename T1::elem_type >::result *junk=0) |
determinant of mat | |
template<typename T1 > | |
arma_warn_unused T1::elem_type | det (const Op< T1, op_diagmat > &X) |
determinant of diagmat | |
template<typename T1 > | |
arma_warn_unused T1::elem_type | det (const Op< T1, op_inv > &in, const typename arma_blas_type_only< typename T1::elem_type >::result *junk=0) |
determinant of inv(A), without doing the inverse operation | |
template<typename T1 > | |
arma_warn_unused T1::elem_type | det (const Op< T1, op_trans > &in, const typename arma_blas_type_only< typename T1::elem_type >::result *junk=0) |
determinant of trans(A) |
arma_warn_unused T1::elem_type det | ( | const Base< typename T1::elem_type, T1 > & | X, | |
const typename arma_blas_type_only< typename T1::elem_type >::result * | junk = 0 | |||
) | [inline] |
determinant of mat
Definition at line 27 of file fn_det.hpp.
References auxlib::det(), and Base< elem_type, derived >::get_ref().
Referenced by det().
00028 { 00029 arma_extra_debug_sigprint(); 00030 00031 typedef typename T1::elem_type eT; 00032 00033 const unwrap<T1> tmp(X.get_ref()); 00034 const Mat<eT>& A = tmp.M; 00035 00036 arma_debug_check( !A.is_square(), "det(): matrix must be square" ); 00037 00038 return auxlib::det(A); 00039 }
arma_warn_unused T1::elem_type det | ( | const Op< T1, op_diagmat > & | X | ) | [inline] |
determinant of diagmat
Definition at line 48 of file fn_det.hpp.
References Op< T1, op_type >::m, and diagmat_proxy< T1 >::n_elem.
00049 { 00050 arma_extra_debug_sigprint(); 00051 00052 typedef typename T1::elem_type eT; 00053 00054 const diagmat_proxy<T1> A(X.m); 00055 00056 arma_debug_check( (A.n_elem == 0), "det(): given object has no elements" ); 00057 00058 eT val = A[0]; 00059 00060 for(u32 i=1; i<A.n_elem; ++i) 00061 { 00062 val *= A[i]; 00063 } 00064 00065 return val; 00066 }
arma_warn_unused T1::elem_type det | ( | const Op< T1, op_inv > & | in, | |
const typename arma_blas_type_only< typename T1::elem_type >::result * | junk = 0 | |||
) | [inline] |
determinant of inv(A), without doing the inverse operation
Definition at line 75 of file fn_det.hpp.
References arma_warn(), isnt_fltpt< T1 >::check(), det(), and Op< T1, op_type >::m.
00076 { 00077 arma_extra_debug_sigprint(); 00078 00079 typedef typename T1::elem_type eT; 00080 isnt_fltpt<eT>::check(); 00081 00082 eT tmp = det(in.m); 00083 arma_warn( (tmp == eT(0)), "det(): warning: denominator is zero" ); 00084 00085 return eT(1) / tmp; 00086 }
arma_warn_unused T1::elem_type det | ( | const Op< T1, op_trans > & | in, | |
const typename arma_blas_type_only< typename T1::elem_type >::result * | junk = 0 | |||
) | [inline] |
determinant of trans(A)
Definition at line 95 of file fn_det.hpp.
References det(), unwrap< T1 >::M, and Op< T1, op_type >::m.
00096 { 00097 arma_extra_debug_sigprint(); 00098 00099 typedef typename T1::elem_type eT; 00100 00101 const unwrap<T1> tmp(in.m); 00102 const Mat<eT>& X = tmp.M; 00103 00104 return det(X); 00105 }