47 std::vector < boost::python::list >
m_data;
53 mutable std::vector < double >
m_row;
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,
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
virtual void clear()
Raises assertion because the contained Python list should not be changed.
column
The column indices for 2 dimension data point tuple.
virtual void reserve(unsigned int count)
Raises assertion because the contained Python list should not be changed.
const std::vector< unsigned int > & getShape() const
Returns the shape of the data elements.
std::vector< intptr_t > shape(numeric::array arr)
virtual double operator[](std::vector< unsigned int > &indices) const
Raises assertion because this method is not implemented yet.
virtual void notifyObservers() const
Notifies observers.
hippodraw::DataSource class interface.
ListTuple()
The default constructor.
virtual void setShape(std::vector< unsigned int > &shape)
Sets the shape of the data elements.
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...
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.
std::vector< boost::python::list > m_data
The numarray objects that contains the data.
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.
int addColumn(const std::string &label, boost::python::list seq)
Adds a column to the end of the ListTuple.
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.
virtual bool empty() const
Returns true, if ListTuple is empty, i.e.
A wrapper class for Python list objects.
A DataSource class implemented with a Python list to store the column data.
virtual ~ListTuple()
The destructor.
Base class for DataSource.
virtual const std::vector< double > & getRow(unsigned int index) const
Returns a const reference to slice along the axis known as a row.