#include <nvectormatrix.h>
Inheritance diagram for regina::NVectorMatrixRow< T >:
Public Member Functions | |
NVectorMatrixRow (const NMatrix< T > &matrix, unsigned whichRow) | |
Creates a new vector that refers to the given row of the given matrix. | |
virtual unsigned | size () const |
Returns the number of elements in the vector. | |
virtual const T & | operator[] (unsigned index) const |
Returns the element at the given index in the vector. |
regina::NVectorMatrixRow< T >::NVectorMatrixRow | ( | const NMatrix< T > & | matrix, | |
unsigned | whichRow | |||
) | [inline] |
Creates a new vector that refers to the given row of the given matrix.
matrix.rows() - 1
inclusive.matrix | the matrix to which this row belongs. | |
whichRow | the row of the given matrix that is this vector. |
virtual unsigned regina::NVectorMatrixRow< T >::size | ( | ) | const [inline, virtual] |
Returns the number of elements in the vector.
Implements regina::NVector< T >.
virtual const T& regina::NVectorMatrixRow< T >::operator[] | ( | unsigned | index | ) | const [inline, virtual] |
Returns the element at the given index in the vector.
A constant reference to the element is returned; the element may not be altered.
index
is between 0 and size()-1 inclusive.index | the vector index to examine. |
Implements regina::NVector< T >.