14 #ifndef NumArrayTuple_H 15 #define NumArrayTuple_H 23 #include <numpy/noprefix.h> 26 #include <Numeric/arrayobject.h> 28 #include <numarray/arrayobject.h> 61 std::vector < boost::python::numeric::array >
m_data;
67 mutable std::vector < double >
m_row;
87 virtual void notifyObservers ( )
const;
91 virtual unsigned int rows ()
const;
95 virtual bool empty ()
const;
97 virtual double valueAt (
unsigned int row,
unsigned int column )
const;
107 int addColumn (
const std::string & label,
108 boost::python::numeric::array array );
115 void replaceColumn (
unsigned int index,
116 boost::python::numeric::array array );
123 void replaceColumn (
const std::string & label,
124 boost::python::numeric::array array );
127 boost::python::numeric::array
128 getNumArray(
const std::string & label )
const;
131 boost::python::numeric::array
132 getNumArray(
unsigned int index )
const;
136 virtual const std::vector < double > & getRow (
unsigned int index )
const;
144 virtual void setShape ( std::vector < unsigned int > &
shape );
148 const std::vector < unsigned int > & getShape ()
const;
156 virtual void fillShape ( std::vector < intptr_t > & v,
157 unsigned int column )
const;
160 virtual void clear ();
163 virtual void reserve (
unsigned int count );
167 operator [] ( std::vector < unsigned int > & indices )
const;
173 #endif // NumArrayTuple_H
Base class for DataSource.
std::vector< boost::python::numeric::array > m_data
The numarray objects that contains the data.
hippodraw::DataSource class interface.
A DataSource class implemented with a Python numarray array to store the column data.
column
The column indices for 2 dimension data point tuple.
std::vector< double > m_row
A temporary array of data from one row of each column.
std::vector< intptr_t > shape(numeric::array arr)