CEDRIC  Revision_backup-2009-02
Public Member Functions | Protected Member Functions | List of all members
DataReader< C > Class Template Reference

Load real valued matrix type data from disk (currently only CSV is supported). More...

#include <DataReader.h>

Public Member Functions

 DataReader (C &data)
 
bool loadCSV (const char *filename)
 
int numRows () const
 
int numColumns () const
 

Protected Member Functions

bool insertValue (int row, int column, double value)
 
void remove_commas (std::string &s)
 
void remove_comments (std::string &s)
 
bool is_comment_or_empty (const std::string &s)
 
template<>
bool insertValue (int row, int column, double value)
 
template<>
bool insertValue (int row, int column, double value)
 
template<>
bool insertValue (int, int, double value)
 
template<>
bool insertValue (int, int, double value)
 

Detailed Description

template<class C>
class DataReader< C >

Load real valued matrix type data from disk (currently only CSV is supported).

C is the used container class, e.g.

Constructor & Destructor Documentation

template<class C>
DataReader< C >::DataReader ( C &  data)
inline

Member Function Documentation

template<class C>
bool DataReader< C >::insertValue ( int  row,
int  column,
double  value 
)
inlineprotected
template<>
bool DataReader< boost::numeric::ublas::matrix< float > >::insertValue ( int  row,
int  column,
double  value 
)
protected
template<>
bool DataReader< boost::numeric::ublas::matrix< double > >::insertValue ( int  row,
int  column,
double  value 
)
protected
template<>
bool DataReader< std::vector< float > >::insertValue ( int  ,
int  ,
double  value 
)
protected
template<>
bool DataReader< std::vector< double > >::insertValue ( int  ,
int  ,
double  value 
)
protected
template<class C>
bool DataReader< C >::is_comment_or_empty ( const std::string &  s)
inlineprotected
template<class C >
bool DataReader< C >::loadCSV ( const char *  filename)
template<class C>
int DataReader< C >::numColumns ( ) const
inline
template<class C>
int DataReader< C >::numRows ( ) const
inline
template<class C>
void DataReader< C >::remove_commas ( std::string &  s)
inlineprotected
template<class C>
void DataReader< C >::remove_comments ( std::string &  s)
inlineprotected