inline bool field<oT>::load(std::istream& is, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); std::string err_msg; const bool load_okay = field_aux::load(*this, is, type, err_msg); if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "field::load(): ", err_msg, "[istream]"); } else { arma_warn(true, "field::load(): couldn't read from [istream]"); } } if(load_okay == false) { (*this).reset(); } return load_okay; }
arma_hot inline void running_stat_vec<eT>::operator() (const Base<typename get_pod_type<eT>::result, T1>& X) { arma_extra_debug_sigprint(); //typedef typename get_pod_type<eT>::result T; const unwrap<T1> tmp(X.get_ref()); const Mat<eT>& sample = tmp.M; if( sample.is_empty() ) { return; } if( sample.is_finite() == false ) { arma_warn(true, "running_stat_vec: sample ignored as it has non-finite elements"); return; } running_stat_vec_aux::update_stats(*this, sample); }
inline void running_stat<eT>::operator() (const std::complex< typename running_stat<eT>::T >& sample) { arma_extra_debug_sigprint(); if( arma_isfinite(sample) == false ) { arma_warn(true, "running_stat: sample ignored as it is non-finite" ); return; } running_stat_aux::update_stats(*this, sample); }
inline bool field<oT>::save(std::ostream& os, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); std::string err_msg; const bool save_okay = field_aux::save(*this, os, type, err_msg); if( (print_status == true) && (save_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "field::save(): ", err_msg, "[ostream]"); } else { arma_warn(true, "field::save(): couldn't write to [ostream]"); } } return save_okay; }
inline arma_warn_unused typename T1::elem_type det(const Op<T1,op_inv>& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; isnt_fltpt<eT>::check(); eT tmp = det(in.m); arma_warn( (tmp == eT(0)), "det(): warning: denominator is zero" ); return eT(1) / tmp; }
inline arma_warn_unused typename T1::elem_type det ( const Op<T1,op_inv>& in, const bool slow = false, const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; eT tmp = det(in.m, slow); arma_warn( (tmp == eT(0)), "det(): warning: denominator is zero" ); return eT(1) / tmp; }
arma_hot inline void running_stat_vec<obj_type>::operator() (const Base< std::complex<typename running_stat_vec<obj_type>::T>, T1>& X) { arma_extra_debug_sigprint(); const quasi_unwrap<T1> tmp(X.get_ref()); const Mat< std::complex<T> >& sample = tmp.M; if( sample.is_empty() ) { return; } if( sample.is_finite() == false ) { arma_warn(true, "running_stat_vec: sample ignored as it has non-finite elements"); return; } running_stat_vec_aux::update_stats(*this, sample); }