47 std::vector < boost::python::list >
m_data;
53 mutable std::vector < double >
m_row;
74 unsigned int static getSize (
const boost::python::list & sequence );
88 virtual unsigned int rows ()
const;
92 virtual bool empty ()
const;
94 virtual double valueAt (
unsigned int row,
unsigned int column )
const;
104 int addColumn (
const std::string & label,
105 boost::python::list seq );
113 boost::python::list array );
121 boost::python::list array );
125 virtual const std::vector < double > &
getRow (
unsigned int index )
const;
133 virtual void setShape ( std::vector < unsigned int > &
shape );
137 const std::vector < unsigned int > &
getShape ()
const;
142 virtual void clear ();
147 virtual void reserve (
unsigned int count );
152 operator [] ( std::vector < unsigned int > & indices )
const;
165 #endif // ListTuple_H
int addColumn(const std::string &label, boost::python::list seq)
Adds a column to the end of the ListTuple.
column
The column indices for 2 dimension data point tuple.
virtual void notifyObservers() const
Notifies observers.
A DataSource class implemented with a Python list to store the column data.
virtual void setShape(std::vector< unsigned int > &shape)
Sets the shape of the data elements.
virtual unsigned int rows() const
Returns the size of the slice for the next to last dimension.
unsigned static int getSize(const boost::python::list &sequence)
std::vector< double > m_row
A temporary array of data from one row of each column.
bool isAcceptable(const boost::python::list &seq)
Returns true if all the elements of the list seq can be converted to type double, otherwise returns f...
virtual bool empty() const
Returns true, if ListTuple is empty, i.e.
void replaceColumn(unsigned int index, boost::python::list array)
Replaces the column indexed by index with the array.
virtual void copy(const DataSource &)
Raises an exception as with this release copying is not supported.
virtual double valueAt(unsigned int row, unsigned int column) const
Returns the value in the table in position given by the row and column indexes.
virtual const std::vector< double > & getRow(unsigned int index) const
Returns a const reference to slice along the axis known as a row.
hippodraw::DataSource class interface.
virtual ~ListTuple()
The destructor.
Base class for DataSource.
virtual double operator[](std::vector< unsigned int > &indices) const
Raises assertion because this method is not implemented yet.
virtual void clear()
Raises assertion because the contained Python list should not be changed.
ListTuple()
The default constructor.
std::vector< intptr_t > shape(numeric::array arr)
virtual void reserve(unsigned int count)
Raises assertion because the contained Python list should not be changed.
std::vector< boost::python::list > m_data
The numarray objects that contains the data.
const std::vector< unsigned int > & getShape() const
Returns the shape of the data elements.