#include <nmatrixfield.h>
Inheritance diagram for regina::NMatrixField< T >:
Public Member Functions | |
NMatrixField (unsigned long rows, unsigned long cols) | |
Creates a new matrix of the given size. | |
NMatrixField (const NMatrix< T > &cloneMe) | |
Creates a new matrix that is a clone of the given matrix. | |
void | divRow (unsigned long row, T factor) |
Divides the given row by the given factor. | |
void | divCol (unsigned long column, T factor) |
Divides the given column by the given factor. | |
NMatrixField< T > * | diagonaliseRow () |
Diagonalises this matrix by applying only row operations. |
=
) operator.
An element t of type T can be written to an output stream out using the standard expression out << t
.
Type T provides binary operators +
, -
, *
and /
and unary operators +=
, *=
and /=
.
regina::NMatrixField< T >::NMatrixField | ( | unsigned long | rows, | |
unsigned long | cols | |||
) | [inline] |
Creates a new matrix of the given size.
All entries will be initialised using their default constructors.
rows | the number of rows in the new matrix. | |
cols | the number of columns in the new matrix. |
regina::NMatrixField< T >::NMatrixField | ( | const NMatrix< T > & | cloneMe | ) | [inline] |
Creates a new matrix that is a clone of the given matrix.
cloneMe | the matrix to clone. |
void regina::NMatrixField< T >::divRow | ( | unsigned long | row, | |
T | factor | |||
) | [inline] |
Divides the given row by the given factor.
Note that factor is passed by value in case it is an element of the row to be changed.
row | the row to work with. | |
factor | the factor by which to divide the given row. |
void regina::NMatrixField< T >::divCol | ( | unsigned long | column, | |
T | factor | |||
) | [inline] |
Divides the given column by the given factor.
Note that factor is passed by value in case it is an element of the row to be changed.
column | the column to work with. | |
factor | the factor by which to divide the given column. |
NMatrixField<T>* regina::NMatrixField< T >::diagonaliseRow | ( | ) | [inline] |
Diagonalises this matrix by applying only row operations.
This matrix will be changed directly. Details of how the diagonalisation was done will be returned.
Note that this matrix need not be invertible and need not even be square.
M * old = D
, where old
is the initial value of this matrix and D
is the diagonalised matrix. M will be a square matrix of size rows().