#include <matrix.H>
Inheritance diagram for Matrix< T >:
When arithmetic operations can be done with elements of type T, it is desirable to perform them with Tables.
The Matrix class is inherited from Table and provides just this. More precisely it is assumed that objects of type T have methods for *=, += and -=. So do objects of type Matrix<T>.
Definition at line 22 of file matrix.H.
Public Member Functions | |
Matrix (long i, long j) | |
Matrix (const Matrix< T > &that) | |
void | make_identity (long n) |
void | get_data_from_matrix_list (const list< Matrix< T > > &L) |
void | swap_lines (long i, long j) |
swaps two lines | |
void | add_line (long i, long j, T coeff) |
adds to line i the result of (line j)*coeff | |
void | multiply_line (long i, T coeff) |
multiplies a line by a coeff | |
bool | is_invertible () const |
checks if the matrix is invertible | |
Matrix< T > | inverse () const |
returns the inverse of this | |
Matrix< T > & | operator+= (const Matrix< T > &that) |
adds a matrix to this | |
Matrix< T > & | operator-= (const Matrix< T > &that) |
takes a matrix from this | |
Matrix< T > & | operator *= (const Matrix< T > &that) |
multiplies by a matrix | |
Matrix< T > & | operator *= (const T &c) |
Matrix< T > | operator * (const T &c) const |
Matrix< T > | operator * (const Matrix< T > &that) const |
operator * | |
Matrix< T > | operator+ (const Matrix< T > &that) const |
operator + | |
Friends | |
void | matrixprod (const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &ans) |
"external" matrix multiplication |
|
adds to line i the result of (line j)*coeff
Definition at line 85 of file matrix.H. Referenced by Matrix< Polynomial< K > >::inverse(), and Matrix< Polynomial< K > >::is_invertible(). |
|
returns the inverse of this
Definition at line 138 of file matrix.H. Referenced by HomFinder::filter_GL(). |
|
checks if the matrix is invertible Uses a copy of the matrix, so quite memory consuming. Optimized for speed however (does not quite compute the determinant entirely). T must be a field. Definition at line 108 of file matrix.H. Referenced by HomFinder::populate_GL(). |
|
multiplies a line by a coeff
Definition at line 93 of file matrix.H. Referenced by Matrix< Polynomial< K > >::inverse(). |
|
operator * do not use for anything other than toy examples ! very inefficient use of memory. |
|
multiplies by a matrix
|
|
operator +
|
|
adds a matrix to this
|
|
takes a matrix from this
|
|
swaps two lines
Definition at line 71 of file matrix.H. Referenced by Matrix< Polynomial< K > >::inverse(), and Matrix< Polynomial< K > >::is_invertible(). |
|
"external" matrix multiplication
Definition at line 282 of file matrix.H. Referenced by Matrix< Polynomial< K > >::operator *(), and Matrix< Polynomial< K > >::operator *=(). |