STK++ 0.9.13
|
A class derived from a DataHandlerBase allows to store various data sets identified by an idData and an idModel. More...
#include <STK_DataHandlerBase.h>
Public Types | |
typedef std::map< std::string, std::string > | InfoMap |
Public Member Functions | |
~DataHandlerBase () | |
destructor | |
InfoMap const & | info () const |
bool | addInfo (std::string const &idData, std::string const &idModel) |
Add an info descriptor to the data handler. | |
bool | getIdModelName (std::string const &idData, std::string &idModel) const |
Giving the Id of a data set, find the Id of the model. | |
void | writeInfo (ostream &os) const |
write infoMap on os | |
![]() | |
Derived & | asDerived () |
static cast : return a reference of this with a cast to the derived class. | |
Derived const & | asDerived () const |
static cast : return a const reference of this with a cast to the derived class. | |
Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
Derived * | clone () const |
create a leaf using the copy constructor of the Derived class. | |
Derived * | clone (bool isRef) const |
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Protected Member Functions | |
DataHandlerBase () | |
default constructor | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
Protected Attributes | |
InfoMap | info_ |
Store the informations of the mixtures in the form (idData, idModel) with. | |
A class derived from a DataHandlerBase allows to store various data sets identified by an idData and an idModel.
A typical usage of a data handler is to store and handle various multiple sets of data. Each data set possess an id (idData) and can be retrieved by using it. To each data set is also associated an idModel allowing to know which kind of (statistical) model is applied in order to model the data set.
Definition at line 69 of file STK_DataHandlerBase.h.
typedef std::map<std::string, std::string> STK::DataHandlerBase< Derived >::InfoMap |
Definition at line 76 of file STK_DataHandlerBase.h.
|
inlineprotected |
|
inline |
bool STK::DataHandlerBase< Derived >::addInfo | ( | std::string const & | idData, |
std::string const & | idModel | ||
) |
Add an info descriptor to the data handler.
An info descriptor is a pair that allow to say that all columns of the data set(s) handled by the data handler and having the name "idData" are modeled by the model with model "idModel".
idData | can be any string given by the user for identifying data. |
idModel | represent the idModel of a given model (can be defined inside or outside STK++). |
false
if there exists already an idData matched with an other idModel, true
otherwise. Definition at line 127 of file STK_DataHandlerBase.h.
bool STK::DataHandlerBase< Derived >::getIdModelName | ( | std::string const & | idData, |
std::string & | idModel | ||
) | const |
Giving the Id of a data set, find the Id of the model.
idData | can be any string given by the user for identifying data. |
idModel | The Id of the model associated with the data (not modified if idData is not present in the map). |
true
if there exists an idData in the InfoMap, false
otherwise. Definition at line 155 of file STK_DataHandlerBase.h.
|
inline |
Definition at line 80 of file STK_DataHandlerBase.h.
References STK::DataHandlerBase< Derived >::info_.
void STK::DataHandlerBase< Derived >::writeInfo | ( | ostream & | os | ) | const |
|
protected |
Store the informations of the mixtures in the form (idData, idModel) with.
Definition at line 110 of file STK_DataHandlerBase.h.
Referenced by STK::DataHandlerBase< Derived >::info().