Public Member Functions | Public Attributes | List of all members
gnsstk::LabeledVector Class Reference

Detailed Description

forward declaration

class LabeledVector. Pretty print a Vector using the labels in a Namelist. For example, the following code produces the following output:

Matrix<double> Cneu; //....
Namelist PosLabNEU("bake-N","bake-E","bake-U");
LabeledMatrix LMcovNEU(PosLabNEU,Cneu);
LMcovNEU.scientific().setw(15).setprecision(3).symmetric();
LOG(INFO) << "\nFixed NEU covariance, " << "REF-to-REF, " << "final total";
LOG(INFO) << LMcovNEU;
Fixed NEU covariance, REF-to-REF, final total
bake-N bake-E bake-U
bake-N 2.824e-06
bake-E -4.396e-07 2.966e-06
bake-U 1.509e-06 2.502e-07 1.266e-05

Definition at line 85 of file Namelist.hpp.

#include <Namelist.hpp>

Public Member Functions

LabeledVectorfixed ()
 Set the format to fixed. More...
 
 LabeledVector (const Namelist &nl, const Vector< double > &v)
 Constructor, defaults are width 12 prec 5 format fixed. More...
 
LabeledVectorlinetag (const std::string &m)
 Set the tag. More...
 
LabeledVectormessage (const std::string &m)
 Set the label or name. More...
 
LabeledVectorscientific ()
 Set the format to scientific. More...
 
LabeledVectorsetprecision (int p)
 Set the precision to p digits. More...
 
LabeledVectorsetw (int w)
 Set the width to w characters. More...
 

Public Attributes

int form
 format - 0=general, 1=fixed(default), 2=integer More...
 
std::string msg
 label (name in Namelist) for each row More...
 
const NamelistNL
 Namelist of names. More...
 
int prec
 precision of fixed, in digits More...
 
std::string tag
 text at beginning of each line (row) More...
 
const Vector< double > & V
 Vector to print. More...
 
int wid
 width of fields, in characters More...
 

Constructor & Destructor Documentation

◆ LabeledVector()

gnsstk::LabeledVector::LabeledVector ( const Namelist nl,
const Vector< double > &  v 
)
inline

Constructor, defaults are width 12 prec 5 format fixed.

Definition at line 97 of file Namelist.hpp.

Member Function Documentation

◆ fixed()

LabeledVector& gnsstk::LabeledVector::fixed ( )
inline

Set the format to fixed.

Definition at line 117 of file Namelist.hpp.

◆ linetag()

LabeledVector& gnsstk::LabeledVector::linetag ( const std::string &  m)
inline

Set the tag.

Definition at line 138 of file Namelist.hpp.

◆ message()

LabeledVector& gnsstk::LabeledVector::message ( const std::string &  m)
inline

Set the label or name.

Definition at line 131 of file Namelist.hpp.

◆ scientific()

LabeledVector& gnsstk::LabeledVector::scientific ( )
inline

Set the format to scientific.

Definition at line 124 of file Namelist.hpp.

◆ setprecision()

LabeledVector& gnsstk::LabeledVector::setprecision ( int  p)
inline

Set the precision to p digits.

Definition at line 110 of file Namelist.hpp.

◆ setw()

LabeledVector& gnsstk::LabeledVector::setw ( int  w)
inline

Set the width to w characters.

Definition at line 103 of file Namelist.hpp.

Member Data Documentation

◆ form

int gnsstk::LabeledVector::form

format - 0=general, 1=fixed(default), 2=integer

Definition at line 90 of file Namelist.hpp.

◆ msg

std::string gnsstk::LabeledVector::msg

label (name in Namelist) for each row

Definition at line 91 of file Namelist.hpp.

◆ NL

const Namelist& gnsstk::LabeledVector::NL

Namelist of names.

Definition at line 93 of file Namelist.hpp.

◆ prec

int gnsstk::LabeledVector::prec

precision of fixed, in digits

Definition at line 89 of file Namelist.hpp.

◆ tag

std::string gnsstk::LabeledVector::tag

text at beginning of each line (row)

Definition at line 92 of file Namelist.hpp.

◆ V

const Vector<double>& gnsstk::LabeledVector::V

Vector to print.

Definition at line 94 of file Namelist.hpp.

◆ wid

int gnsstk::LabeledVector::wid

width of fields, in characters

Definition at line 88 of file Namelist.hpp.


The documentation for this class was generated from the following file:
LOG
#define LOG(level)
define the macro that is used to write to the log stream
Definition: logstream.hpp:315
gnsstk::INFO
@ INFO
Definition: logstream.hpp:57


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45