STK++ 0.9.13
|
#include <STK_ExportToCsv.h>
Public Member Functions | |
ExportToCsv () | |
Default constructor. | |
ExportToCsv (DataFrame const &df) | |
Constructor : create an instance of ExportToCvs with a DataFrame. | |
template<class Type > | |
ExportToCsv (TReadWriteCsv< Type > const &rw) | |
Constructor : create an instance of ExportToCvs with a ReadWriteCsv. | |
template<class Container > | |
ExportToCsv (ITContainer1D< Container > const &A, bool byCol=true, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) | |
Instantiates an instance of ExportToCvs with an Array1D, a list1D, etc.... | |
template<class Container > | |
ExportToCsv (ITContainer< Container, Arrays::vector_ > const &A, bool byCol=true, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) | |
Instantiates an instance of ExportToCvs with a vector. | |
template<class Container > | |
ExportToCsv (ITContainer< Container, Arrays::point_ > const &A, bool byCol=false, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) | |
Instantiates an instance of ExportToCvs with a point. | |
template<class Container > | |
ExportToCsv (ITContainer< Container > const &A, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) | |
Instantiates an instance of ExportToCvs with a general array. | |
~ExportToCsv () | |
destructor. | |
template<class Container > | |
void | append (ITContainer< Container, Arrays::vector_ > const &A, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) |
Append a vector. | |
template<class Container > | |
void | append (ITContainer< Container, Arrays::point_ > const &A, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) |
Append a point (as a column vector). | |
template<class Container > | |
void | append (ITContainer< Container, Arrays::array2D_ > const &A, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) |
Append a 2D container. | |
template<class Container > | |
void | append (ITContainer< Container, Arrays::square_ > const &A, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) |
Append a 2D container. | |
template<class TYPE > | |
void | appendData (TYPE const &A, String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) |
Append a value. | |
void | setColumnsNames (String const &prefix=Csv::DEFAULT_COLUMN_PREFIX) |
Set a name to each column of the ReadWriteCsv using the form prefix + number. | |
ReadWriteCsv *const | p_readWriteCsv () const |
Accesor. | |
void | release () |
release the ReadWriteCsv. | |
Protected Attributes | |
ReadWriteCsv * | p_data_ |
ptr on the ReadWriteCsv containing the data. | |
Export data to a Csv.
An ExportToCsv object creates a ReadWriteCsv
from a container of data like a DataFrame, a Vector, a point or a ArrayXX. The data are stored in a String format in the ReadWriteCsv
struct.
Definition at line 62 of file STK_ExportToCsv.h.
|
inline |
Default constructor.
Create an instance of ExportToCvs.
Definition at line 66 of file STK_ExportToCsv.h.
Constructor : create an instance of ExportToCvs with a DataFrame.
df | the DataFrame to export |
Definition at line 70 of file STK_ExportToCsv.h.
References STK::DataFrame::beginCols(), STK::DataFrame::elt(), STK::DataFrame::endCols(), STK::IVariable::exportAsString(), p_data_, STK::DataFrame::sizeCols(), and STK::DataFrame::sizeRows().
|
inline |
Constructor : create an instance of ExportToCvs with a ReadWriteCsv.
rw | the TReadWriteCsv to export |
Definition at line 82 of file STK_ExportToCsv.h.
References p_data_.
|
inline |
Instantiates an instance of ExportToCvs with an Array1D, a list1D, etc....
A | the 1D container to export |
byCol | export the container as a column vector or a row vector ? |
prefix | the prefix of the name to set to the variable |
Definition at line 98 of file STK_ExportToCsv.h.
References p_data_, stk_cout, and STK::typeToString().
|
inline |
Instantiates an instance of ExportToCvs with a vector.
A | the ITContainer to export |
byCol | export the container as a column vector or a raw vector ? |
prefix | the prefix of the name to set to the variable |
Definition at line 130 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Instantiates an instance of ExportToCvs with a point.
A | the ITContainer1D to export |
byCol | export the container as a column vector or a raw vector ? |
prefix | the prefix ot the name to set to the variable |
Definition at line 159 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Instantiates an instance of ExportToCvs with a general array.
A | the IArray2d to export |
prefix | the prefix ot the name to set to the variable |
Definition at line 187 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
destructor.
The protected field p_data_ will be liberated.
Definition at line 204 of file STK_ExportToCsv.h.
References p_data_.
|
inline |
Append a 2D container.
A | the container to export |
prefix | the prefix ot the name to set to the variable |
Definition at line 236 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Append a point (as a column vector).
A | the container to export |
prefix | the prefix ot the name to set to the variable |
Definition at line 223 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Append a 2D container.
A | the container to export |
prefix | the prefix ot the name to set to the variable |
Definition at line 252 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Append a vector.
A | the container to export |
prefix | the prefix ot the name to set to the variable |
Definition at line 210 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Append a value.
A | the value to export |
prefix | the prefix ot the name to set to the variable |
Definition at line 268 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
inline |
Accesor.
Return a ptr on the the ReadWriteCsv.
Definition at line 286 of file STK_ExportToCsv.h.
References p_data_.
|
inline |
release the ReadWriteCsv.
It will be freed by the user.
Definition at line 288 of file STK_ExportToCsv.h.
References p_data_.
Set a name to each column of the ReadWriteCsv using the form prefix + number.
prefix | the prefix to use for the names of the columns |
Definition at line 279 of file STK_ExportToCsv.h.
References p_data_, and STK::typeToString().
|
protected |
ptr on the ReadWriteCsv containing the data.
Definition at line 292 of file STK_ExportToCsv.h.
Referenced by append(), append(), append(), append(), appendData(), ExportToCsv(), ExportToCsv(), ExportToCsv(), ExportToCsv(), ExportToCsv(), ExportToCsv(), p_readWriteCsv(), release(), setColumnsNames(), and ~ExportToCsv().