Public Member Functions | Public Attributes | List of all members
Eigen::IOFormat Class Reference

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 coeffSeparator
 
int flags
 
std::string matPrefix
 
std::string matSuffix
 
int precision
 
std::string rowPrefix
 
std::string rowSeparator
 
std::string rowSpacer
 
std::string rowSuffix
 

Detailed Description

Stores a set of parameters controlling the way matrices are printed.

List of available parameters:

Example:

std::string sep = "\n----------------------------------------\n";
Matrix3d m1;
m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9;
IOFormat CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";");
IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]");
IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]");
IOFormat HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]");
std::cout << m1 << sep;
std::cout << m1.format(CommaInitFmt) << sep;
std::cout << m1.format(CleanFmt) << sep;
std::cout << m1.format(OctaveFmt) << sep;
std::cout << m1.format(HeavyFmt) << sep;

Output:

See also
DenseBase::format(), class WithFormat

Definition at line 50 of file IO.h.

Constructor & Destructor Documentation

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.

Member Data Documentation

std::string Eigen::IOFormat::coeffSeparator

Definition at line 73 of file IO.h.

int Eigen::IOFormat::flags

Definition at line 75 of file IO.h.

std::string Eigen::IOFormat::matPrefix

Definition at line 71 of file IO.h.

std::string Eigen::IOFormat::matSuffix

Definition at line 71 of file IO.h.

int Eigen::IOFormat::precision

Definition at line 74 of file IO.h.

std::string Eigen::IOFormat::rowPrefix

Definition at line 72 of file IO.h.

std::string Eigen::IOFormat::rowSeparator

Definition at line 72 of file IO.h.

std::string Eigen::IOFormat::rowSpacer

Definition at line 72 of file IO.h.

std::string Eigen::IOFormat::rowSuffix

Definition at line 72 of file IO.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:52:45