Helios++
Helios software for LiDAR simulations
|
The abstract class which represents the fundamentals of any design matrix. More...
#include <AbstractDesignMatrix.h>
Public Member Functions | |
AbstractDesignMatrix (vector< string > const &columnNames=vector< string >(0)) | |
Default constructor for the AbstractDesignMatrix. More... | |
virtual T & | operator() (size_t const i, size_t const j)=0 |
Access operator for the element at \(i\)-th row and \(j\)-th column of the AbstractDesignMatrix. More... | |
T & | operator() (size_t const i, string const columnName) |
Like the AbstractDesignMatrix::operator()(size_t const, size_t const) method but specifying the column by its name instead of its index. More... | |
bool | hasColumnNames () const |
Check whether there are available column names for the AbstractDesignMatrix (true) or not (false) More... | |
string const & | getColumnName (size_t const j) const |
Obtain the name of the \(j\)-th column. More... | |
void | setColumnName (size_t const j, string const &columnName) |
Set the name of the \(j\)-th column. More... | |
vector< string > const & | getColumnNames () const |
Obtain a constant/read reference to the column names. More... | |
void | setColumnNames (vector< string > const &columnNames) |
Obtain a constant/read reference to the column names. More... | |
virtual size_t | getNumRows () const =0 |
Obtain the number of rows of the AbstractDesignMatrix. More... | |
virtual size_t | getNumColumns () const =0 |
Obtain the number of columns of the AbstractDesignMatrix. More... | |
virtual size_t | getNumElements () const =0 |
Obtain the number of elements of the AbstractDesignMatrix. More... | |
Protected Member Functions | |
size_t | translateColumnNameToIndex (string const &columnName) const |
Find the corresponding column name for given index. More... | |
Protected Attributes | |
vector< string > | columnNames |
The column names for the DesignMatrix. It can be either an empty vector when no column names are specified or a vector with as many names as columns (in the same order) | |
The abstract class which represents the fundamentals of any design matrix.
T | Type \(\mathcal{T}\) of element for the design matrix \(X\) such that \(x_{ij} \in \mathcal{T}\). |
|
inline |
Default constructor for the AbstractDesignMatrix.
columnNames | Either the name for each column or an empty vector if there are no names |
|
inline |
Obtain the name of the \(j\)-th column.
j | Index of the column which name must be obtained |
|
inline |
Obtain a constant/read reference to the column names.
|
inlinepure virtual |
Obtain the number of columns of the AbstractDesignMatrix.
Implemented in fluxionum::DiffDesignMatrix< TimeType, VarType >, fluxionum::DesignMatrix< T >, and fluxionum::DesignMatrix< VarType >.
|
inlinepure virtual |
Obtain the number of elements of the AbstractDesignMatrix.
Implemented in fluxionum::DiffDesignMatrix< TimeType, VarType >, fluxionum::DesignMatrix< T >, and fluxionum::DesignMatrix< VarType >.
|
inlinepure virtual |
Obtain the number of rows of the AbstractDesignMatrix.
Implemented in fluxionum::DiffDesignMatrix< TimeType, VarType >, fluxionum::DesignMatrix< T >, and fluxionum::DesignMatrix< VarType >.
|
inline |
Check whether there are available column names for the AbstractDesignMatrix (true) or not (false)
|
pure virtual |
Access operator for the element at \(i\)-th row and \(j\)-th column of the AbstractDesignMatrix.
i | The row of the element being accessed |
j | The column of the element being accessed |
Implemented in fluxionum::DiffDesignMatrix< TimeType, VarType >, fluxionum::DesignMatrix< T >, and fluxionum::DesignMatrix< VarType >.
|
inline |
Like the AbstractDesignMatrix::operator()(size_t const, size_t const) method but specifying the column by its name instead of its index.
columnName | The name of the column of the element being accessed |
|
inline |
Set the name of the \(j\)-th column.
j | Index of the column which name must be setted |
columnName | New name for the \(j\)-th column |
|
inline |
Obtain a constant/read reference to the column names.
columnNames | The new column names for the AbstractDesignMatrix |
|
inlineprotected |
Find the corresponding column name for given index.
columnName | The name of the column which index must be obtained |