#include <nvectormatrix.h>
Public Member Functions | |
NVectorMatrixCol (const NMatrix< T > &matrix, unsigned whichCol) | |
Creates a new vector that refers to the given column 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::NVectorMatrixCol< T >::NVectorMatrixCol | ( | const NMatrix< T > & | matrix, | |
unsigned | whichCol | |||
) | [inline] |
Creates a new vector that refers to the given column of the given matrix.
matrix.columns() - 1
inclusive.matrix | the matrix to which this column belongs. | |
whichCol | the column of the given matrix that is this vector. |
virtual const T& regina::NVectorMatrixCol< 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 >.
virtual unsigned regina::NVectorMatrixCol< T >::size | ( | ) | const [inline, virtual] |
Returns the number of elements in the vector.
Implements regina::NVector< T >.