MOAB
4.9.3pre
|
Stores a set of parameters controlling the way matrices are printed. More...
#include <IO.h>
Public Member Functions | |
IOFormat (int _precision=StreamPrecision, int _flags=0, const std::string &_coeffSeparator=" ", const std::string &_rowSeparator="\n", const std::string &_rowPrefix="", const std::string &_rowSuffix="", const std::string &_matPrefix="", const std::string &_matSuffix="") | |
Public Attributes | |
std::string | matPrefix |
std::string | matSuffix |
std::string | rowPrefix |
std::string | rowSuffix |
std::string | rowSeparator |
std::string | rowSpacer |
std::string | coeffSeparator |
int | precision |
int | flags |
Stores a set of parameters controlling the way matrices are printed.
List of available parameters:
StreamPrecision
and FullPrecision
. The default is the special value StreamPrecision
which means to use the stream's own precision setting, as set for instance using cout.precision(3)
. The other special value FullPrecision
means that the number of digits will be computed to match the full precision of each floating-point type.DontAlignCols
which allows to disable the alignment of columns, resulting in faster code.Example:
Output:
Eigen::IOFormat::IOFormat | ( | int | _precision = StreamPrecision , |
int | _flags = 0 , |
||
const std::string & | _coeffSeparator = " " , |
||
const std::string & | _rowSeparator = "\n" , |
||
const std::string & | _rowPrefix = "" , |
||
const std::string & | _rowSuffix = "" , |
||
const std::string & | _matPrefix = "" , |
||
const std::string & | _matSuffix = "" |
||
) | [inline] |
Default constructor, see class IOFormat for the meaning of the parameters
Definition at line 53 of file IO.h.
: matPrefix(_matPrefix), matSuffix(_matSuffix), rowPrefix(_rowPrefix), rowSuffix(_rowSuffix), rowSeparator(_rowSeparator), rowSpacer(""), coeffSeparator(_coeffSeparator), precision(_precision), flags(_flags) { // TODO check if rowPrefix, rowSuffix or rowSeparator contains a newline // don't add rowSpacer if columns are not to be aligned if((flags & DontAlignCols)) return; int i = int(matSuffix.length())-1; while (i>=0 && matSuffix[i]!='\n') { rowSpacer += ' '; i--; } }
std::string Eigen::IOFormat::coeffSeparator |
std::string Eigen::IOFormat::matPrefix |
std::string Eigen::IOFormat::matSuffix |
std::string Eigen::IOFormat::rowPrefix |
std::string Eigen::IOFormat::rowSeparator |
std::string Eigen::IOFormat::rowSpacer |
std::string Eigen::IOFormat::rowSuffix |