functions and macros provided to ease debugging.
More...
|
#define | TRACE std::cerr << MR::App::NAME << ": at " << __FILE__ << ": " << __LINE__ << "\n"; |
| Prints the current function, file and line number. More...
|
|
#define | VAR(variable) std::cerr << MR::App::NAME << " [" << __FILE__ << ": " << __LINE__ << "]: " << #variable << " = " << (variable) << "\n"; |
| Prints a variable name and its value, followed by the function, file and line number. More...
|
|
#define | MAT(variable) |
| Prints a matrix name and in the following line its formatted value. More...
|
|
#define | VEC(variable) |
|
#define | PAUSE |
| Stops execution and prints current function, file and line number. Remuses on user input (i.e. Return key). More...
|
|
functions and macros provided to ease debugging.
◆ MAT
Value: { \
Eigen::IOFormat fmt(Eigen::FullPrecision, 0, ", ", ",\n ", "[", "]", "\nnp.array([", "])"); \
std::cerr <<
MR::App::NAME <<
" [" << __FILE__ <<
": " << __LINE__ <<
"]: " << #variable <<
" = " << (variable.format(fmt)) <<
"\n"; \
}
Prints a matrix name and in the following line its formatted value.
Definition at line 45 of file debug.h.
◆ PAUSE
Value: { \
std::cerr <<
MR::App::NAME <<
" [" << __FILE__ <<
": " << __LINE__ <<
"]: paused (press any key to resume)\n"; \
}
std::istream & getline(std::istream &stream, std::string &string)
read a line from the stream
Stops execution and prints current function, file and line number. Remuses on user input (i.e. Return key).
Definition at line 59 of file debug.h.
◆ TRACE
#define TRACE std::cerr << MR::App::NAME << ": at " << __FILE__ << ": " << __LINE__ << "\n"; |
Prints the current function, file and line number.
Definition at line 36 of file debug.h.
◆ VAR
#define VAR |
( |
|
variable | ) |
std::cerr << MR::App::NAME << " [" << __FILE__ << ": " << __LINE__ << "]: " << #variable << " = " << (variable) << "\n"; |
Prints a variable name and its value, followed by the function, file and line number.
Definition at line 41 of file debug.h.
◆ VEC
Value: { \
std::cerr <<
MR::App::NAME <<
" [" << __FILE__ <<
": " << __LINE__ <<
"]: " << #variable <<
" = "; \
for (ssize_t i=0; i<variable.size(); ++i){std::cerr <<
str(variable(i)) <<
" "; } \
std::cerr << std::endl; \
}
std::string str(const T &value, int precision=0)
Definition at line 50 of file debug.h.