Public Member Functions | |
Table () | |
Table (const unsigned int size) | |
const T & | operator[] (const unsigned int i) const |
T & | operator[] (const unsigned int i) |
const T & | operator() (const unsigned int i) const |
T & | operator() (const unsigned int i) |
T & | operator() (const TableIndices< 1 > &indices) |
const T & | operator() (const TableIndices< 1 > &indices) const |
A class representing a one-dimensional table, i.e. a vector-like class. Since the C++ library has a vector class, there is probably not much need for this particular class, but since it is so simple to implement on top of the template base class, we provide it anyway.
For the rationale of this class, and a description of the interface, see the base class.
Constructor. Pass down the given dimension to the base class.
Access operator. Since this is a one-dimensional object, this simply accesses the requested data element. Returns a read-only reference.
Access operator. Since this is a one-dimensional object, this simply accesses the requested data element. Returns a read-write reference.
Access operator. Since this is a one-dimensional object, this simply accesses the requested data element. Returns a read-only reference.
Access operator. Since this is a one-dimensional object, this simply accesses the requested data element. Returns a read-write reference.
T& Table< 1, T >::operator() | ( | const TableIndices< 1 > & | indices | ) |
Make the corresponding operator() from the TableBase base class available also in this class.
const T& Table< 1, T >::operator() | ( | const TableIndices< 1 > & | indices | ) | const |
Make the corresponding operator() from the TableBase base class available also in this class.