STK++ 0.9.13
|
The CsvToArray class allow to export the data of some Type
stored in a TReadWriteCsv
in an Array
.
More...
#include <STK_CsvToArray.h>
Public Types | |
typedef TReadWriteCsv< Type > | Rw |
Public Member Functions | |
CsvToArray (Rw const &rw, Real const &propMiss=0.) | |
Constructor. | |
CsvToArray (CsvToArray const &exporter) | |
copy constructor. | |
virtual | ~CsvToArray () |
destructor | |
CsvToArray * | clone () const |
clone pattern | |
Real const & | propMiss () const |
void | setPropMiss (Real const &propMiss) |
Set the maximal proportion of missing value allowed. | |
bool | run () |
run the export. | |
Array * | p_data () |
Accessor. | |
void | release () |
release the Array. | |
![]() | |
String const & | error () const |
get the last error message. | |
Private Attributes | |
Rw const & | rw_ |
A reference to the TReadWriteCsv we want to export. | |
Array * | p_data_ |
A pointer on the 2D Container the class will create. | |
Real | propMiss_ |
proportion of missing values allowed | |
Additional Inherited Members | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
The CsvToArray class allow to export the data of some Type
stored in a TReadWriteCsv
in an Array
.
The Variables are moved, so take care that the variables present in the TReadWriteCsv cannot be modified without affecting the Array.
The Array container is created on the stack and will be deleted with the CsvToArray
structure. It is possible to release the Array container by calling explicitly the release()
method. In this case the end user will have to free it directly.
It is possible to control the behavior of the import by specifying the maximal proportion of missing value (0 by default). Each column having more missing value will be discarded.
Definition at line 134 of file STK_CsvToArray.h.
typedef TReadWriteCsv<Type> STK::CsvToArray< Array, Type >::Rw |
Definition at line 137 of file STK_CsvToArray.h.
|
inline |
Constructor.
rw | the TReadWriteCsv to import |
propMiss | proportion of missing value allowed |
Definition at line 142 of file STK_CsvToArray.h.
|
inline |
copy constructor.
exporter | the CsvToArray to copy |
Definition at line 148 of file STK_CsvToArray.h.
|
inlinevirtual |
destructor
Definition at line 152 of file STK_CsvToArray.h.
References STK::CsvToArray< Array, Type >::p_data_.
|
inline |
clone pattern
Definition at line 154 of file STK_CsvToArray.h.
|
inline |
Accessor.
get the Array. This method is not constant in order to allow to the user to modify directly the 2D container.
Definition at line 178 of file STK_CsvToArray.h.
References STK::CsvToArray< Array, Type >::p_data_.
|
inline |
Definition at line 156 of file STK_CsvToArray.h.
References STK::CsvToArray< Array, Type >::propMiss_.
Referenced by STK::CsvToArray< Array, Type >::setPropMiss().
|
inline |
release the Array.
It will be freed by the user.
Definition at line 180 of file STK_CsvToArray.h.
References STK::CsvToArray< Array, Type >::p_data_.
|
inlinevirtual |
run the export.
Implements STK::IRunnerBase.
Definition at line 162 of file STK_CsvToArray.h.
References STK::IRunnerBase::error(), STK::IRunnerBase::msg_error_, STK::CsvToArray< Array, Type >::p_data_, STK::CsvToArray< Array, Type >::propMiss_, and STK::CsvToArray< Array, Type >::rw_.
|
inline |
Set the maximal proportion of missing value allowed.
propMiss | the allowed proportion of missiong values |
Definition at line 160 of file STK_CsvToArray.h.
References STK::CsvToArray< Array, Type >::propMiss(), and STK::CsvToArray< Array, Type >::propMiss_.
|
private |
A pointer on the 2D Container the class will create.
Definition at line 186 of file STK_CsvToArray.h.
Referenced by STK::CsvToArray< Array, Type >::p_data(), STK::CsvToArray< Array, Type >::release(), STK::CsvToArray< Array, Type >::run(), and STK::CsvToArray< Array, Type >::~CsvToArray().
|
private |
proportion of missing values allowed
Definition at line 188 of file STK_CsvToArray.h.
Referenced by STK::CsvToArray< Array, Type >::propMiss(), STK::CsvToArray< Array, Type >::run(), and STK::CsvToArray< Array, Type >::setPropMiss().
|
private |
A reference to the TReadWriteCsv we want to export.
Definition at line 184 of file STK_CsvToArray.h.
Referenced by STK::CsvToArray< Array, Type >::run().