Go to the documentation of this file.
48 #ifndef CLASS_NAMELIST_INCLUDE
49 #define CLASS_NAMELIST_INCLUDE
273 std::ostream&
operator<<(std::ostream& os,
const LabeledMatrix& lm);
276 std::ostream&
operator<<(std::ostream& os,
const LabeledVector& lv);
302 Namelist(
const std::vector<std::string>& names);
326 for (
unsigned int i = 0; i < right.
size(); i++)
327 this->
operator+=(right.
getName(i));
342 void swap(
const unsigned int& i,
const unsigned int& j);
348 void resize(
unsigned int n);
360 bool contains(
const std::string& name)
const;
418 std::string
getName(
const unsigned int in)
const;
424 bool setName(
const unsigned int in,
const std::string& name);
429 int index(
const std::string& name)
const;
const Namelist & NL
Namelist of names.
LabeledMatrix & scientific()
Set the format to scientific.
bool sym
if true, print only lower triangle
int index(const std::string &name) const
std::vector< std::string > labels
vector of names (strings)
const Namelist & NLrows
Namelist of rows.
void clear()
empty the list
friend Namelist operator&(const Namelist &N1, const Namelist &N2)
construct the subset Namelist which is common to the two inputs (AND)
LabeledMatrix(const Namelist &nr, const Namelist &nc, const Matrix< double > &m)
const Namelist & NLcols
Namelist of columns.
LabeledVector & fixed()
Set the format to fixed.
bool contains(const std::string &name) const
does the Namelist contain the input name?
LabeledVector & scientific()
Set the format to scientific.
void resize(unsigned int n)
resize the list by either truncation or adding default names.
Namelist & operator+=(const std::string &name)
LabeledMatrix & both()
Print labels on both rows and columns.
LabeledVector(const Namelist &nl, const Vector< double > &v)
Constructor, defaults are width 12 prec 5 format fixed.
LabeledMatrix & fixed()
Set the format to fixed.
bool valid() const
is the Namelist valid? checks for repeated names
LabeledMatrix & cols()
Print labels on columns only.
void sort()
reorder the list by sorting
int form
format: 1=fixed, 2=scientific
int wid
width of fields, in characters
friend bool operator!=(const Namelist &N1, const Namelist &N2)
are two Namelists different, ignoring permutations?
friend std::ostream & operator<<(std::ostream &os, const LabeledMatrix &N)
output ostream operator for LabeledMatrix
friend Namelist operator^(const Namelist &N1, const Namelist &N2)
construct the subset Namelist which is NOT common to two others (XOR)
Namelist & operator|=(const Namelist &N)
replace this with (this | input)
Namelist & operator&=(const Namelist &N)
replace this with (this& input)
std::string tag
text at beginning of each line (row)
LabeledMatrix & setprecision(int p)
Set the precision to p digits.
std::string msg
label (name in Namelist) for each row
LabeledMatrix(const Namelist &nl, const Matrix< double > &m)
friend bool operator==(const Namelist &N1, const Namelist &N2)
are two Namelists identical, ignoring permutations?
LabeledVector & setw(int w)
Set the width to w characters.
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
LabeledVector & setprecision(int p)
Set the precision to p digits.
LabeledVector & message(const std::string &m)
Set the label or name.
LabeledVector operator()(Vector< double > &v)
unsigned int size() const
return the size of the list.
std::string msg
label (name in Namelist) for each row
friend Namelist operator|(const Namelist &N1, const Namelist &N2)
merge two Namelists, i.e. construct a non-redundant combination (OR)
Namelist & operator^=(const Namelist &N)
replace this with (this ^ input)
std::string getName(const unsigned int in) const
Namelist()
empty constructor
LabeledVector & linetag(const std::string &m)
Set the tag.
Namelist(const Namelist &names)
copy constructor
#define GNSSTK_RETHROW(exc)
Namelist & operator=(const Namelist &right)
operator=
const Matrix< double > & M
Matrix to print.
LabeledMatrix & message(const std::string &m)
Print the given message.
int rc
label rows only (1) columns only (2) or both (0)
LabeledMatrix operator()(Matrix< double > &m)
LabeledMatrix & clean(bool s=true)
If true, print 0.0 as 0.
LabeledMatrix & symmetric(bool s=true)
If true, the matrix is symmetrical, so print only the lower triangle.
void randomize(long seed=0)
randomize the list
std::string tag
text at beginning of each line (row)
LabeledMatrix & rows()
Print labels on rows only.
Namelist & operator+=(const Namelist &right)
add entire Namelist to this using operator+=(string)
int wid
width of fields, in characters
int prec
precision of fixed, in digits
int prec
precision of fixed, in digits
LabeledMatrix & linetag(const std::string &m)
Print the given tag at the beginning of each line.
friend bool identical(const Namelist &N1, const Namelist &N2)
are two Namelists exactly identical, even considering permutations?
void swap(const unsigned int &i, const unsigned int &j)
const Vector< double > & V
Vector to print.
bool cln
if true, print 0.0 as "0"
int form
format - 0=general, 1=fixed(default), 2=integer
bool setName(const unsigned int in, const std::string &name)
LabeledMatrix & setw(int w)
Set the width to w characters.
Namelist & operator-=(const std::string &name)
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40