16 #include <type_traits> 31 this->frames_to_cut_ = {
"arma_stop"};
34 void print_info(std::ostringstream &out)
const override {
36 estream <<
"Armadillo Message: " << EI_Message::val <<
"\n";
52 if (this->str().find(
"error") != string::npos) {
56 e << EI_Message(this->str());
57 _LOG( Logger::MsgType::message ) << e.what();
60 std::cout << this->str() << std::endl;
69 static std::ostream arma_stream(&stream_buf);
70 arma::set_stream_err1(arma_stream);
71 arma::set_stream_err2(arma_stream);
82 for(
unsigned int i_row=0; i_row < mat.n_rows; i_row ++ ) {
83 if (i_row != 0) ss <<
", ";
85 for(
unsigned int i_col=0; i_col < mat.n_cols; i_col++) {
86 if (i_col != 0) ss <<
", ";
87 if (std::is_floating_point<decltype(mat.at(0,0))>::
value)
89 ss << mat.at(i_row, i_col);
91 ss << mat.at(i_row, i_col);
104 for(
unsigned int i=0; i < vec.n_elem; i++) {
105 if (i != 0) ss <<
", ";
106 if (std::is_floating_point<decltype(vec[0])>::
value)
116 template <
class IsScalar>
122 inline static string print(
const T &mat,
unsigned int prec) {
136 inline static string print(
const T &mat,
unsigned int prec) {
137 if (mat.n_cols == 1 || mat.n_rows == 1) {
153 #define FIELD_VALUE_TO_YAML_DIM(dim) \ 154 template string field_value_to_yaml(arma::Mat<double>::fixed<dim,dim> const &mat, unsigned int prec); \ 155 template string field_value_to_yaml(const arma::Mat<int>::fixed<dim,dim> &mat, unsigned int prec); \ 156 template string field_value_to_yaml(const arma::Mat<unsigned int>::fixed<dim,dim> &mat, unsigned int prec); \ 157 template string field_value_to_yaml(const arma::Col<double>::fixed<dim> &mat, unsigned int prec); \ 158 template string field_value_to_yaml(const arma::Col<int>::fixed<dim> &mat, unsigned int prec); \ 159 template string field_value_to_yaml(const arma::Col<unsigned int>::fixed<dim> &mat, unsigned int prec); 165 template string field_value_to_yaml(
const arma::Col<unsigned int> &mat,
unsigned int prec);
static string print(const T &mat, unsigned int prec)
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
static string print(const T &mat, unsigned int prec)
void print_info(std::ostringstream &out) const override
static constexpr bool value
#define _LOG(type)
Internal macro defining universal record of log.
Base of exceptions used in Flow123d.