|
STK++ 0.9.13
|
The DataFrameToArray2D class allow to export the data of some TYPE stored in a DataFrame to be exported in an Array2D.
More...
#include <STK_DataFrameToArray2D.h>
Public Member Functions | |
| DataFrameToArray2D (DataFrame const &df) | |
| Constructor. | |
| ~DataFrameToArray2D () | |
| destructor | |
| void | run () |
| run the export. | |
| Array2D< Type > * | p_data () |
| Accessor. | |
| void | release () |
| release the Array2D. | |
| void | eraseNAValues (bool byRow) |
| remove NA values from the Array2D | |
Private Attributes | |
| DataFrame const & | df_ |
| A reference to the DataFrame we want to exprt. | |
| Array2D< Type > * | p_data_ |
| A pointer on the 2D Container the class will create. | |
The DataFrameToArray2D class allow to export the data of some TYPE stored in a DataFrame to be exported in an Array2D.
The 2D container is created on the stack and will be deleted with the DataFrameToArray2D structure. It is possible to release the 2D container by calling explicitly the release(). In this case the end user will have to free directly the Array2D.
Definition at line 55 of file STK_DataFrameToArray2D.h.
|
inline |
Constructor.
| df | the DataFrame to export |
Definition at line 61 of file STK_DataFrameToArray2D.h.
|
inline |
destructor
Definition at line 63 of file STK_DataFrameToArray2D.h.
References STK::DataFrameToArray2D< Type >::p_data_.
|
inline |
remove NA values from the Array2D
| byRow | true if the user want to delete the rows with NA values, false if the user want to remove the column with NA values. |
Definition at line 95 of file STK_DataFrameToArray2D.h.
References STK::DataFrameToArray2D< Type >::p_data_.
|
inline |
Accessor.
get the 2D container. This method is not constant in order to the user to modified directly the 2D container.
Definition at line 88 of file STK_DataFrameToArray2D.h.
References STK::DataFrameToArray2D< Type >::p_data_.
|
inline |
release the Array2D.
It will be freed by the user.
Definition at line 90 of file STK_DataFrameToArray2D.h.
References STK::DataFrameToArray2D< Type >::p_data_.
|
inline |
run the export.
Definition at line 65 of file STK_DataFrameToArray2D.h.
References STK::DataFrame::beginCols(), STK::DataFrameToArray2D< Type >::df_, STK::DataFrame::elt(), STK::DataFrame::lastIdxCols(), STK::DataFrameToArray2D< Type >::p_data_, and STK::IdTypeImpl< TYPE >::returnType().
|
private |
A reference to the DataFrame we want to exprt.
Definition at line 155 of file STK_DataFrameToArray2D.h.
Referenced by STK::DataFrameToArray2D< Type >::run().
|
private |
A pointer on the 2D Container the class will create.
Definition at line 157 of file STK_DataFrameToArray2D.h.
Referenced by STK::DataFrameToArray2D< Type >::eraseNAValues(), STK::DataFrameToArray2D< Type >::p_data(), STK::DataFrameToArray2D< Type >::release(), STK::DataFrameToArray2D< Type >::run(), and STK::DataFrameToArray2D< Type >::~DataFrameToArray2D().