Public Member Functions |
| | NMatrixRing (unsigned long rows, unsigned long cols) |
| | Creates a new matrix of the given size.
|
| | NMatrixRing (const NMatrix< T > &cloneMe) |
| | Creates a new matrix that is a clone of the given matrix.
|
| void | makeIdentity () |
| | Turns this matrix into an identity matrix.
|
| bool | isIdentity () const |
| | Determines whether this matrix is a square identity matrix.
|
| void | addRow (unsigned long source, unsigned long dest) |
| | Adds the given source row to the given destination row.
|
| void | addRow (unsigned long source, unsigned long dest, T copies) |
| | Adds the given number of copies of the given source row to the given destination row.
|
| void | addCol (unsigned long source, unsigned long dest) |
| | Adds the given source column to the given destination column.
|
| void | addCol (unsigned long source, unsigned long dest, T copies) |
| | Adds the given number of copies of the given source column to the given destination column.
|
| void | multRow (unsigned long row, T factor) |
| | Multiplies the given row by the given factor.
|
| void | multCol (unsigned long column, T factor) |
| | Multiplies the given column by the given factor.
|
| std::auto_ptr< NMatrixRing< T > > | operator* (const NMatrixRing< T > &other) const |
| | Multiplies this by the given matrix, and returns the result.
|
| template<class MatrixClass > |
| std::auto_ptr< MatrixClass > | multiplyAs (const NMatrixRing< T > &other) const |
| | Multiplies this by the given matrix, and returns a new matrix of subclass MatrixClass.
|
| T | det () const |
| | Evaluates the determinant of the matrix.
|
| | NMatrix (unsigned long rows, unsigned long cols) |
| | Creates a new matrix of the given size.
|
| | NMatrix (const NMatrix &cloneMe) |
| | Creates a new matrix that is a clone of the given matrix.
|
| virtual | ~NMatrix () |
| | Destroys this matrix.
|
| void | initialise (const T &value) |
| | Sets every entry in the matrix to the given value.
|
| void | initialise (List allValues) |
| | A Python-only routine that fills the matrix with the given set of elements.
|
| unsigned long | rows () const |
| | Returns the number of rows in this matrix.
|
| unsigned long | columns () const |
| | Returns the number of columns in this matrix.
|
| T & | entry (unsigned long row, unsigned long column) |
| | Returns the entry at the given row and column.
|
| const T & | entry (unsigned long row, unsigned long column) const |
| | Returns the entry at the given row and column.
|
| bool | operator== (const NMatrix< T > &other) const |
| | Determines whether this and the given matrix are identical.
|
| bool | operator!= (const NMatrix< T > &other) const |
| | Determines whether this and the given matrix are different.
|
| virtual void | writeMatrix (std::ostream &out) const |
| | Writes a complete representation of the matrix to the given output stream.
|
| void | swapRows (unsigned long first, unsigned long second) |
| | Swaps the elements of the two given rows in the matrix.
|
| void | swapColumns (unsigned long first, unsigned long second) |
| | Swaps the elements of the two given columns in the matrix.
|
template<class T>
class regina::NMatrixRing< T >
Represents a matrix of elements from a given ring T.
Note that many important functions (such as entry()) are inherited from the parent class NMatrix, and are not documented again here.
- Precondition:
- Type T has a default constructor and overloads the assignment (
=) 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 *=.
-
Type T has a long integer constructor. That is, if
a is of type T, then a can be initialised to a long integer l using a(l). Here the value 1 refers to the multiplicative identity in the ring T.
- Python:
- Not present, although the subclass NMatrixInt is.