//! More...
Namespaces | |
namespace | junk |
Functions | |
template<typename T1 > | |
void arma_cold | arma_stop (const T1 &x) |
print a message to std::cout and/or throw a run-time error exception | |
void arma_cold | arma_print () |
template<typename T1 > | |
void arma_cold | arma_print (const T1 &x) |
template<typename T1 , typename T2 > | |
void arma_cold | arma_print (const T1 &x, const T2 &y) |
template<typename T1 , typename T2 , typename T3 > | |
void arma_cold | arma_print (const T1 &x, const T2 &y, const T3 &z) |
void | arma_sigprint (const char *x) |
print a message on cout, with a preceding @ character. //! used for printing the signature of a function //! (see the arma_extra_debug_sigprint macro) | |
void | arma_bktprint () |
template<typename T1 > | |
void | arma_bktprint (const T1 &x) |
template<typename T1 , typename T2 > | |
void | arma_bktprint (const T1 &x, const T2 &y) |
void | arma_thisprint (void *this_ptr) |
template<typename T1 > | |
void arma_hot | arma_warn (const bool state, const T1 &x) |
if state is true, print a message on cout | |
template<typename T1 , typename T2 > | |
void arma_hot | arma_warn (const bool state, const T1 &x, const T2 &y) |
template<typename T1 > | |
void arma_hot | arma_check (const bool state, const T1 &x) |
if state is true, abort program | |
template<typename T1 , typename T2 > | |
void arma_hot | arma_check (const bool state, const T1 &x, const T2 &y) |
std::string arma_cold | arma_incompat_size_string (const u32 A_n_rows, const u32 A_n_cols, const u32 B_n_rows, const u32 B_n_cols, const char *x) |
void arma_hot | arma_assert_same_size (const u32 A_n_rows, const u32 A_n_cols, const u32 B_n_rows, const u32 B_n_cols, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Mat< eT1 > &A, const Mat< eT2 > &B, const char *x) |
stop if given matrices have different sizes | |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Proxy< eT1 > &A, const Proxy< eT2 > &B, const char *x) |
stop if given proxies have different sizes | |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const subview< eT1 > &A, const subview< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Mat< eT1 > &A, const subview< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const subview< eT1 > &A, const Mat< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Mat< eT1 > &A, const Proxy< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Proxy< eT1 > &A, const Mat< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Proxy< eT1 > &A, const subview< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const subview< eT1 > &A, const Proxy< eT2 > &B, const char *x) |
arma_cold std::string | arma_incompat_size_string (const u32 A_n_rows, const u32 A_n_cols, const u32 A_n_slices, const u32 B_n_rows, const u32 B_n_cols, const u32 B_n_slices, const char *x) |
void arma_hot | arma_assert_same_size (const u32 A_n_rows, const u32 A_n_cols, const u32 A_n_slices, const u32 B_n_rows, const u32 B_n_cols, const u32 B_n_slices, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Cube< eT1 > &A, const Cube< eT2 > &B, const char *x) |
stop if given cubes have different sizes | |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Cube< eT1 > &A, const subview_cube< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const subview_cube< eT1 > &A, const Cube< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const subview_cube< eT1 > &A, const subview_cube< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const ProxyCube< eT1 > &A, const ProxyCube< eT2 > &B, const char *x) |
stop if given cube proxies have different sizes | |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Cube< eT1 > &A, const Mat< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Mat< eT1 > &A, const Cube< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const subview_cube< eT1 > &A, const Mat< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_same_size (const Mat< eT1 > &A, const subview_cube< eT2 > &B, const char *x) |
void arma_hot | arma_assert_mul_size (const u32 A_n_rows, const u32 A_n_cols, const u32 B_n_rows, const u32 B_n_cols, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_mul_size (const Mat< eT1 > &A, const Mat< eT2 > &B, const char *x) |
stop if given matrices are incompatible for multiplication | |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_mul_size (const Mat< eT1 > &A, const Mat< eT2 > &B, const bool do_trans_A, const bool do_trans_B, const char *x) |
stop if given matrices are incompatible for multiplication | |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_mul_size (const Mat< eT1 > &A, const subview< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_mul_size (const subview< eT1 > &A, const Mat< eT2 > &B, const char *x) |
template<typename eT1 , typename eT2 > | |
void arma_hot | arma_assert_mul_size (const subview< eT1 > &A, const subview< eT2 > &B, const char *x) |
//!
void arma_cold arma_stop | ( | const T1 & | x | ) | [inline] |
print a message to std::cout and/or throw a run-time error exception
Definition at line 29 of file debug.hpp.
Referenced by eglue_cube_core< eglue_type >::apply(), eglue_cube_core< eglue_type >::apply_inplace_div(), eglue_core< eglue_type >::apply_inplace_div(), eglue_cube_core< eglue_type >::apply_inplace_minus(), eglue_core< eglue_type >::apply_inplace_minus(), eglue_cube_core< eglue_type >::apply_inplace_plus(), eglue_core< eglue_type >::apply_inplace_plus(), eglue_cube_core< eglue_type >::apply_inplace_schur(), eglue_core< eglue_type >::apply_inplace_schur(), eglue_core< eglue_type >::apply_proxy(), eglue_core< eglue_type >::apply_unwrap(), arma_assert_mul_size(), arma_assert_same_size(), arma_check(), auxlib::chol(), auxlib::det(), eig_gen(), auxlib::eig_gen(), auxlib::eig_sym(), eglue_cube_core< eglue_type >::get_elem(), eglue_core< eglue_type >::get_elem(), auxlib::inv_inplace(), auxlib::inv_noalias(), auxlib::log_det(), auxlib::lu(), norm_proxy(), norm_unwrap(), eop_cube_core< eop_cube_type >::process(), eop_core< eop_type >::process(), auxlib::qr(), auxlib::solve(), auxlib::solve_od(), auxlib::solve_ud(), auxlib::svd(), wall_clock::tic(), and wall_clock::toc().
{ std::cerr.flush(); std::cout.flush(); std::cout << '\n'; std::cout << "run-time error: " << x << '\n'; std::cout << '\n'; std::cout.flush(); throw std::runtime_error(""); }
void arma_cold arma_print | ( | ) | [inline] |
Definition at line 51 of file debug.hpp.
Referenced by op_chol::apply(), glue_solve::apply(), arma_warn(), op_princomp::direct_princomp(), op_princomp_cov::direct_princomp_cov(), Mat< eT >::load(), field< oT >::load(), Cube< eT >::load(), qr(), rand(), rank(), field< oT >::save(), and svd().
{ std::cout << std::endl; }
void arma_cold arma_print | ( | const T1 & | x | ) | [inline] |
void arma_cold arma_print | ( | const T1 & | x, | |
const T2 & | y | |||
) | [inline] |
void arma_cold arma_print | ( | const T1 & | x, | |
const T2 & | y, | |||
const T3 & | z | |||
) | [inline] |
void arma_sigprint | ( | const char * | x | ) | [inline] |
void arma_bktprint | ( | ) | [inline] |
void arma_bktprint | ( | const T1 & | x | ) | [inline] |
void arma_bktprint | ( | const T1 & | x, | |
const T2 & | y | |||
) | [inline] |
void arma_thisprint | ( | void * | this_ptr | ) | [inline] |
void arma_hot arma_warn | ( | const bool | state, | |
const T1 & | x | |||
) | [inline] |
if state is true, print a message on cout
Definition at line 164 of file debug.hpp.
References arma_print().
Referenced by op_inv::apply(), det(), Mat< eT >::load(), Cube< eT >::load(), Mat< eT >::save(), and Cube< eT >::save().
{ if(state==true) { arma_print(x); } }
void arma_hot arma_warn | ( | const bool | state, | |
const T1 & | x, | |||
const T2 & | y | |||
) | [inline] |
Definition at line 177 of file debug.hpp.
References arma_print().
{ if(state==true) { arma_print(x,y); } }
void arma_hot arma_check | ( | const bool | state, | |
const T1 & | x | |||
) | [inline] |
if state is true, abort program
Definition at line 197 of file debug.hpp.
References arma_stop(), and arma_boost::str_wrapper().
Referenced by subview< eT >::at(), subview_field< oT >::at(), subview_cube< eT >::at(), subview< eT >::colptr(), Cube< eT >::create_mat(), diagview< eT >::fill(), Mat< eT >::init(), field< oT >::init(), Cube< eT >::init(), diagview< eT >::ones(), subview< eT >::operator()(), subview_field< oT >::operator()(), subview_cube< eT >::operator()(), running_stat_vec< eT >::operator()(), diagview< eT >::operator()(), diagview< eT >::operator=(), subview< eT >::operator[](), subview_field< oT >::operator[](), subview_cube< eT >::operator[](), subview_cube< eT >::slice_colptr(), and diagview< eT >::zeros().
{ if(state==true) { arma_stop(arma_boost::str_wrapper(x)); } }
void arma_hot arma_check | ( | const bool | state, | |
const T1 & | x, | |||
const T2 & | y | |||
) | [inline] |
Definition at line 210 of file debug.hpp.
References arma_stop().
{ if(state==true) { arma_stop( std::string(x) + std::string(y) ); } }
std::string arma_cold arma_incompat_size_string | ( | const u32 | A_n_rows, | |
const u32 | A_n_cols, | |||
const u32 | B_n_rows, | |||
const u32 | B_n_cols, | |||
const char * | x | |||
) | [inline] |
Definition at line 231 of file debug.hpp.
Referenced by arma_assert_mul_size(), and arma_assert_same_size().
{ std::stringstream tmp; tmp << x << ": incompatible matrix dimensions: (" << A_n_rows << ',' << A_n_cols << ") and (" << B_n_rows << ',' << B_n_cols << ')'; return tmp.str(); }
void arma_hot arma_assert_same_size | ( | const u32 | A_n_rows, | |
const u32 | A_n_cols, | |||
const u32 | B_n_rows, | |||
const u32 | B_n_cols, | |||
const char * | x | |||
) | [inline] |
Definition at line 245 of file debug.hpp.
References arma_incompat_size_string(), and arma_stop().
Referenced by eglue_cube_core< eglue_type >::apply_inplace_div(), eglue_core< eglue_type >::apply_inplace_div(), eglue_cube_core< eglue_type >::apply_inplace_minus(), eglue_core< eglue_type >::apply_inplace_minus(), glue_times::apply_inplace_plus(), eglue_cube_core< eglue_type >::apply_inplace_plus(), eglue_core< eglue_type >::apply_inplace_plus(), eglue_cube_core< eglue_type >::apply_inplace_schur(), eglue_core< eglue_type >::apply_inplace_schur(), Cube< eT >::Cube(), eGlue< T1, T2, eglue_type >::eGlue(), eGlueCube< T1, T2, eglue_type >::eGlueCube(), and Mat< eT >::Mat().
{ if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } }
void arma_hot arma_assert_same_size | ( | const Mat< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
stop if given matrices have different sizes
Definition at line 260 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const Proxy< eT1 > & | A, | |
const Proxy< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
stop if given proxies have different sizes
Definition at line 275 of file debug.hpp.
References arma_incompat_size_string(), and arma_stop().
{ if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) ); } }
void arma_hot arma_assert_same_size | ( | const subview< eT1 > & | A, | |
const subview< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 289 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const Mat< eT1 > & | A, | |
const subview< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 303 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, Mat< eT >::n_cols, subview< eT >::n_rows, and Mat< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const subview< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 317 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, subview< eT >::n_cols, Mat< eT >::n_rows, and subview< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const Mat< eT1 > & | A, | |
const Proxy< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 331 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const Proxy< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 345 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const Proxy< eT1 > & | A, | |
const subview< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 359 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const subview< eT1 > & | A, | |
const Proxy< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 373 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.
void arma_hot arma_assert_same_size | ( | const u32 | A_n_rows, | |
const u32 | A_n_cols, | |||
const u32 | A_n_slices, | |||
const u32 | B_n_rows, | |||
const u32 | B_n_cols, | |||
const u32 | B_n_slices, | |||
const char * | x | |||
) | [inline] |
Definition at line 405 of file debug.hpp.
References arma_incompat_size_string(), and arma_stop().
{ if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) || (A_n_slices != B_n_slices) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, A_n_slices, B_n_rows, B_n_cols, B_n_slices, x) ); } }
void arma_hot arma_assert_same_size | ( | const Cube< eT1 > & | A, | |
const Cube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
stop if given cubes have different sizes
Definition at line 420 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Cube< eT >::n_cols, Cube< eT >::n_rows, and Cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const Cube< eT1 > & | A, | |
const subview_cube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 434 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview_cube< eT >::n_cols, Cube< eT >::n_cols, subview_cube< eT >::n_rows, Cube< eT >::n_rows, subview_cube< eT >::n_slices, and Cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const subview_cube< eT1 > & | A, | |
const Cube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 448 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Cube< eT >::n_cols, subview_cube< eT >::n_cols, Cube< eT >::n_rows, subview_cube< eT >::n_rows, Cube< eT >::n_slices, and subview_cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const subview_cube< eT1 > & | A, | |
const subview_cube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 462 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview_cube< eT >::n_cols, subview_cube< eT >::n_rows, and subview_cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const ProxyCube< eT1 > & | A, | |
const ProxyCube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
stop if given cube proxies have different sizes
Definition at line 477 of file debug.hpp.
References arma_incompat_size_string(), and arma_stop().
{ if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices)) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) ); } }
void arma_hot arma_assert_same_size | ( | const Cube< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 496 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, Cube< eT >::n_cols, Mat< eT >::n_rows, Cube< eT >::n_rows, and Cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const Mat< eT1 > & | A, | |
const Cube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 510 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Cube< eT >::n_cols, Mat< eT >::n_cols, Cube< eT >::n_rows, Mat< eT >::n_rows, and Cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const subview_cube< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 524 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, subview_cube< eT >::n_cols, Mat< eT >::n_rows, subview_cube< eT >::n_rows, and subview_cube< eT >::n_slices.
void arma_hot arma_assert_same_size | ( | const Mat< eT1 > & | A, | |
const subview_cube< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 538 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview_cube< eT >::n_cols, Mat< eT >::n_cols, subview_cube< eT >::n_rows, Mat< eT >::n_rows, and subview_cube< eT >::n_slices.
void arma_hot arma_assert_mul_size | ( | const u32 | A_n_rows, | |
const u32 | A_n_cols, | |||
const u32 | B_n_rows, | |||
const u32 | B_n_cols, | |||
const char * | x | |||
) | [inline] |
Definition at line 556 of file debug.hpp.
References arma_incompat_size_string(), and arma_stop().
{ if(A_n_cols != B_n_rows) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } }
void arma_hot arma_assert_mul_size | ( | const Mat< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
stop if given matrices are incompatible for multiplication
Definition at line 571 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
void arma_hot arma_assert_mul_size | ( | const Mat< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const bool | do_trans_A, | |||
const bool | do_trans_B, | |||
const char * | x | |||
) | [inline] |
stop if given matrices are incompatible for multiplication
Definition at line 586 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.
{ const u32 final_A_n_cols = (do_trans_A == false) ? A.n_cols : A.n_rows; const u32 final_B_n_rows = (do_trans_B == false) ? B.n_rows : B.n_cols; if(final_A_n_cols != final_B_n_rows) { const u32 final_A_n_rows = (do_trans_A == false) ? A.n_rows : A.n_cols; const u32 final_B_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows; arma_stop( arma_incompat_size_string(final_A_n_rows, final_A_n_cols, final_B_n_rows, final_B_n_cols, x) ); } }
void arma_hot arma_assert_mul_size | ( | const Mat< eT1 > & | A, | |
const subview< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 606 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, Mat< eT >::n_cols, Mat< eT >::n_rows, and subview< eT >::n_rows.
void arma_hot arma_assert_mul_size | ( | const subview< eT1 > & | A, | |
const Mat< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 620 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, subview< eT >::n_cols, subview< eT >::n_rows, and Mat< eT >::n_rows.
void arma_hot arma_assert_mul_size | ( | const subview< eT1 > & | A, | |
const subview< eT2 > & | B, | |||
const char * | x | |||
) | [inline] |
Definition at line 634 of file debug.hpp.
References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.