class LabeledMatrix. Pretty print a Matrix using the labels in a Namelist. For example, the following code produces the following output:
Definition at line 162 of file Namelist.hpp.
#include <Namelist.hpp>
Public Member Functions | |
LabeledMatrix & | both () |
Print labels on both rows and columns. More... | |
LabeledMatrix & | clean (bool s=true) |
If true, print 0.0 as 0. More... | |
LabeledMatrix & | cols () |
Print labels on columns only. More... | |
LabeledMatrix & | fixed () |
Set the format to fixed. More... | |
LabeledMatrix (const Namelist &nl, const Matrix< double > &m) | |
LabeledMatrix (const Namelist &nr, const Namelist &nc, const Matrix< double > &m) | |
LabeledMatrix & | linetag (const std::string &m) |
Print the given tag at the beginning of each line. More... | |
LabeledMatrix & | message (const std::string &m) |
Print the given message. More... | |
LabeledMatrix & | rows () |
Print labels on rows only. More... | |
LabeledMatrix & | scientific () |
Set the format to scientific. More... | |
LabeledMatrix & | setprecision (int p) |
Set the precision to p digits. More... | |
LabeledMatrix & | setw (int w) |
Set the width to w characters. More... | |
LabeledMatrix & | symmetric (bool s=true) |
If true, the matrix is symmetrical, so print only the lower triangle. More... | |
Public Attributes | |
bool | cln |
if true, print 0.0 as "0" More... | |
int | form |
format: 1=fixed, 2=scientific More... | |
const Matrix< double > & | M |
Matrix to print. More... | |
std::string | msg |
label (name in Namelist) for each row More... | |
const Namelist & | NLcols |
Namelist of columns. More... | |
const Namelist & | NLrows |
Namelist of rows. More... | |
int | prec |
precision of fixed, in digits More... | |
int | rc |
label rows only (1) columns only (2) or both (0) More... | |
bool | sym |
if true, print only lower triangle More... | |
std::string | tag |
text at beginning of each line (row) More... | |
int | wid |
width of fields, in characters More... | |
Constructor, defaults are width 12 prec 5 format fixed, not symmetric, label both rows and columns, same names on rows and columns
Definition at line 179 of file Namelist.hpp.
|
inline |
Constructor, defaults are width 12 prec 5 format fixed, not symmetric, label both rows and columns, different names on rows and columns
Definition at line 187 of file Namelist.hpp.
|
inline |
Print labels on both rows and columns.
Definition at line 237 of file Namelist.hpp.
|
inline |
If true, print 0.0 as 0.
Definition at line 230 of file Namelist.hpp.
|
inline |
Print labels on columns only.
Definition at line 251 of file Namelist.hpp.
|
inline |
Set the format to fixed.
Definition at line 209 of file Namelist.hpp.
|
inline |
Print the given tag at the beginning of each line.
Definition at line 265 of file Namelist.hpp.
|
inline |
Print the given message.
Definition at line 258 of file Namelist.hpp.
|
inline |
Print labels on rows only.
Definition at line 244 of file Namelist.hpp.
|
inline |
Set the format to scientific.
Definition at line 216 of file Namelist.hpp.
|
inline |
Set the precision to p digits.
Definition at line 202 of file Namelist.hpp.
|
inline |
Set the width to w characters.
Definition at line 195 of file Namelist.hpp.
|
inline |
If true, the matrix is symmetrical, so print only the lower triangle.
Definition at line 223 of file Namelist.hpp.
bool gnsstk::LabeledMatrix::cln |
if true, print 0.0 as "0"
Definition at line 170 of file Namelist.hpp.
int gnsstk::LabeledMatrix::form |
format: 1=fixed, 2=scientific
Definition at line 167 of file Namelist.hpp.
Matrix to print.
Definition at line 175 of file Namelist.hpp.
std::string gnsstk::LabeledMatrix::msg |
label (name in Namelist) for each row
Definition at line 171 of file Namelist.hpp.
Namelist of columns.
Definition at line 174 of file Namelist.hpp.
Namelist of rows.
Definition at line 173 of file Namelist.hpp.
int gnsstk::LabeledMatrix::prec |
precision of fixed, in digits
Definition at line 166 of file Namelist.hpp.
int gnsstk::LabeledMatrix::rc |
label rows only (1) columns only (2) or both (0)
Definition at line 168 of file Namelist.hpp.
bool gnsstk::LabeledMatrix::sym |
if true, print only lower triangle
Definition at line 169 of file Namelist.hpp.
std::string gnsstk::LabeledMatrix::tag |
text at beginning of each line (row)
Definition at line 172 of file Namelist.hpp.
int gnsstk::LabeledMatrix::wid |
width of fields, in characters
Definition at line 165 of file Namelist.hpp.