14 #ifndef _PyDataSource_H 15 #define _PyDataSource_H 51 void checkRank ( boost::python::numeric::array array );
73 void static extractVector ( boost::python::numeric::array array,
74 std::vector<double> & col );
79 template <
typename T >
80 void static copy_direct ( boost::python::numeric::array array,
81 std::vector<double > & col );
91 unsigned int columns()
const;
93 unsigned int rows()
const;
96 const std::string & getTitle ()
const;
98 void setTitle(
const std::string & title);
102 void setName(
const std::string & name);
105 const std::vector<std::string> & getLabels()
const;
108 const std::vector<double> & getColumn(
const std::string & name)
const;
110 const std::vector<double> & getColumn(
unsigned int index)
const;
113 void replaceColumn(
const std::string &,
114 const std::vector<double> & col);
117 void replaceColumn(
unsigned int index,
118 const std::vector<double> & col);
122 void replaceColumn (
const std::string &,
123 boost::python::numeric::array array );
127 void replaceColumn (
unsigned int index,
128 boost::python::numeric::array array);
131 int addColumn(
const std::string & label,
132 const std::vector<double> & col );
140 int addColumn(
const std::string & label,
141 boost::python::numeric::array array );
148 bool hasColumn(
const std::string & name)
const;
152 std::string registerNTuple();
156 void registerNTuple(
const std::string & name );
161 boost::python::numeric::array
162 columnAsNumArray(
const std::string & label )
const;
167 boost::python::numeric::array
168 columnAsNumArray(
unsigned int index )
const;
172 void saveColumn (
const std::string & label,
173 const std::vector < double > & v,
174 const std::vector < intptr_t > &
shape );
179 void saveColumnFromNumArray(
const std::string & label,
180 boost::python::numeric::array array );
185 void saveColumnFromNumArray(
unsigned int index,
186 boost::python::numeric::array array );
191 void saveColumnFrom (
const std::string & label,
192 const std::vector < double > & array );
196 void addRow (
const std::vector < double > & array );
210 const char *
what()
const throw() {
211 return m_what.c_str();
230 #endif // _PyDataSource_H
DataSource * m_dataSource
The actual DataSource object.
StopIteration(const std::string &what)
Base class for DataSource.
const char * what() const
This class is the public interface to a DataSource object that the user sees as the DataArray object ...
std::string m_type
The type of data source.
const DataSource & dataSource() const
Return a reference to the underlying DataSource.
std::vector< intptr_t > shape(numeric::array arr)