3 #include <fluxionum/FluxionumException.h>
64 if(name == columnName)
return true;
67 ss <<
"AbstractDesignMatrix::translateColumnNameToIndex failed to "
68 <<
"find a column with name: \"" << columnName <<
"\"";
84 virtual T&
operator() (
size_t const i,
size_t const j) = 0;
92 inline T&
operator() (
size_t const i,
string const columnName)
The abstract class which represents the fundamentals of any design matrix.
Definition: AbstractDesignMatrix.h:26
string const & getColumnName(size_t const j) const
Obtain the name of the -th column.
Definition: AbstractDesignMatrix.h:111
virtual T & operator()(size_t const i, size_t const j)=0
Access operator for the element at -th row and -th column of the AbstractDesignMatrix.
AbstractDesignMatrix(vector< string > const &columnNames=vector< string >(0))
Default constructor for the AbstractDesignMatrix.
Definition: AbstractDesignMatrix.h:45
virtual size_t getNumElements() const =0
Obtain the number of elements of the AbstractDesignMatrix.
void setColumnName(size_t const j, string const &columnName)
Set the name of the -th column.
Definition: AbstractDesignMatrix.h:119
vector< string > columnNames
The column names for the DesignMatrix. It can be either an empty vector when no column names are spec...
Definition: AbstractDesignMatrix.h:35
virtual size_t getNumColumns() const =0
Obtain the number of columns of the AbstractDesignMatrix.
void setColumnNames(vector< string > const &columnNames)
Obtain a constant/read reference to the column names.
Definition: AbstractDesignMatrix.h:132
virtual size_t getNumRows() const =0
Obtain the number of rows of the AbstractDesignMatrix.
bool hasColumnNames() const
Check whether there are available column names for the AbstractDesignMatrix (true) or not (false)
Definition: AbstractDesignMatrix.h:104
size_t translateColumnNameToIndex(string const &columnName) const
Find the corresponding column name for given index.
Definition: AbstractDesignMatrix.h:62
vector< string > const & getColumnNames() const
Obtain a constant/read reference to the column names.
Definition: AbstractDesignMatrix.h:126
Base class for fluxionum exceptions.
Definition: FluxionumException.h:16