38#ifndef STK_CSVTOARRAY_H
39#define STK_CSVTOARRAY_H
53template<
class OtherType>
69 for (
int i =p_data->beginRows();
i<= p_data->lastIdxRows(); ++
i)
81 p_data->reserveCols(
rw.size());
85 p_data->merge(
rw.var(
jVar));
107 for (
int i =p_data->beginRows();
i<= p_data->lastIdxRows(); ++
i)
133template<
class Array,
class Type =
typename Array::Type>
In this file we implement the final class CArray.
In this file we define the class TReadWriteCsv.
template two dimensional column (vertically) oriented Array.
A CArray is a two dimensional array with a continuous storage like a C-array.
The CsvToArray class allow to export the data of some Type stored in a TReadWriteCsv in an Array.
Array * p_data()
Accessor.
bool run()
run the export.
void release()
release the Array.
CsvToArray * clone() const
clone pattern
Rw const & rw_
A reference to the TReadWriteCsv we want to export.
CsvToArray(CsvToArray const &exporter)
copy constructor.
CsvToArray(Rw const &rw, Real const &propMiss=0.)
Constructor.
Real propMiss_
proportion of missing values allowed
virtual ~CsvToArray()
destructor
Array * p_data_
A pointer on the 2D Container the class will create.
Real const & propMiss() const
void setPropMiss(Real const &propMiss)
Set the maximal proportion of missing value allowed.
Sdk class for all library Exceptions.
Abstract base class for all classes having a.
String msg_error_
String with the last error message.
String const & error() const
get the last error message.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
std::basic_string< Char > String
STK fundamental type of a String.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range
static void run(TReadWriteCsv< String > const &rw, Array2D< OtherType > *p_data, Real const propMiss)
static void run(TReadWriteCsv< Type > const &rw, Array2D< Type > *p_data, Real const propMiss)
static void run(TReadWriteCsv< Type > const &rw, CArray< Type > *p_data, Real const propMiss)
Implementation of CsvToArray.