Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

regina::NVectorMatrixCol< T > Class Template Reference
[Mathematical Support]

A vector that corresponds to a column of a matrix. More...

#include <nvectormatrix.h>

Inheritance diagram for regina::NVectorMatrixCol< T >:

regina::NVectorMatrix< T > regina::NVector< T > List of all members.

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.


Detailed Description

template<class T>
class regina::NVectorMatrixCol< T >

A vector that corresponds to a column of a matrix.

Precondition:
See the preconditions for NVector<T>.
Python:
Not present.


Constructor & Destructor Documentation

template<class T>
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.

Precondition:
The given column is between 0 and matrix.columns() - 1 inclusive.
Parameters:
matrix the matrix to which this column belongs.
whichCol the column of the given matrix that is this vector.


Member Function Documentation

template<class T>
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.

Precondition:
index is between 0 and size()-1 inclusive.
Parameters:
index the vector index to examine.
Returns:
the vector element at the given index.

Implements regina::NVector< T >.

template<class T>
virtual unsigned regina::NVectorMatrixCol< T >::size  )  const [inline, virtual]
 

Returns the number of elements in the vector.

Returns:
the vector size.

Implements regina::NVector< T >.


The documentation for this class was generated from the following file:
Copyright © 1999-2004, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).