|
| PID_Matrix () |
|
| PID_Matrix (const base &M) |
|
| PID_Matrix (base &&M) |
|
| PID_Matrix (size_t m, size_t n) |
|
| PID_Matrix (size_t m, size_t n, const C &c) |
|
| PID_Matrix (size_t n) |
|
| PID_Matrix (const std::vector< Vector< C > > &cols, size_t n_rows) |
|
template<typename I > |
| PID_Matrix (I begin, I end, size_t n_rows, tags::IteratorTag) |
|
PID_Matrix & | operator+= (const Matrix< C > &M) |
|
PID_Matrix & | operator-= (const Matrix< C > &M) |
|
PID_Matrix & | operator*= (const Matrix< C > &Q) |
|
PID_Matrix & | leftMult (const Matrix< C > &P) |
|
PID_Matrix & | operator/= (const C &c) throw (std::runtime_error) |
|
PID_Matrix & | negate () |
|
PID_Matrix & | transpose () |
|
PID_Matrix & | invert () |
|
PID_Matrix & | invert (C &d) |
|
PID_Matrix | transposed () const |
|
PID_Matrix | negative_transposed () const |
|
PID_Matrix | inverse () const |
|
PID_Matrix | inverse (C &d) const |
|
PID_Matrix | operator* (const Matrix< C > &Q) const |
|
PID_Matrix | on_basis (const std::vector< Vector< C > > &basis) const |
|
bool | divisible (C) const |
|
PID_Matrix | block (size_t i0, size_t j0, size_t i1, size_t j1) const |
|
| Matrix () |
|
| Matrix (const base &M) |
|
| Matrix (base &&M) |
|
| Matrix (size_t m, size_t n) |
|
| Matrix (size_t m, size_t n, const C &c) |
|
| Matrix (const std::vector< Vector< C > > &cols, size_t n_rows) |
|
template<typename I > |
| Matrix (I begin, I end, size_t n_rows, tags::IteratorTag) |
|
| Matrix (size_t n) |
| : Construct the identity matrix of size n. More...
|
|
Matrix | transposed () const |
|
Matrix | negative_transposed () const |
|
template<typename C1 > |
Vector< C1 > | operator* (const Vector< C1 > &) const |
|
template<typename C1 > |
Vector< C1 > | right_prod (const Vector< C1 > &) const |
|
template<typename C1 > |
void | apply_to (Vector< C1 > &v) const |
|
template<typename C1 > |
void | right_mult (Vector< C1 > &v) const |
|
Matrix | operator* (const Matrix &) const |
|
Matrix & | operator+= (const Matrix &) |
|
Matrix & | operator-= (const Matrix &) |
|
Matrix & | operator*= (const Matrix &Q) |
|
Matrix & | leftMult (const Matrix &P) |
|
Matrix & | negate () |
|
Matrix & | transpose () |
|
void | rowOperation (size_t, size_t, const C &) |
|
void | columnOperation (size_t j, size_t k, const C &c) |
|
void | rowMultiply (size_t i, C f) |
|
void | columnMultiply (size_t j, C f) |
|
void | swapColumns (size_t, size_t) |
| Interchange columns. More...
|
|
void | swapRows (size_t, size_t) |
| Interchanges rows. More...
|
|
| Matrix_base () |
|
| Matrix_base (size_t m, size_t n) |
|
| Matrix_base (size_t m, size_t n, const C &c) |
|
| Matrix_base (const std::vector< Vector< C > > &, size_t n_rows) |
| This constructor constructs a matrix from a list of vectors, column-wise. It is assumed that all elements of |b| (possibly none) have size |n_rows|. More...
|
|
template<typename I > |
| Matrix_base (I begin, I end, size_t n_rows, tags::IteratorTag) |
|
void | swap (Matrix_base &) |
|
size_t | numRows () const |
|
size_t | numColumns () const |
|
size_t | rowSize () const |
|
size_t | columnSize () const |
|
const C & | operator() (size_t i, size_t j) const |
|
void | get_row (Vector< C > &, size_t) const |
|
void | get_column (Vector< C > &, size_t) const |
|
Vector< C > | row (size_t i) const |
|
std::vector< Vector< C > > | rows () const |
|
Vector< C > | column (size_t j) const |
|
std::vector< Vector< C > > | columns () const |
|
bool | operator== (const Matrix_base< C > &) const |
|
bool | operator!= (const Matrix_base< C > &m) const |
|
bool | is_zero () const |
|
bool | isEmpty () const |
|
C & | operator() (size_t i, size_t j) |
|
void | set_row (size_t, const Vector< C > &) |
| Puts v in the i-th row of the matrix. More...
|
|
void | set_column (size_t, const Vector< C > &) |
| Puts v in the j-th column of the matrix. More...
|
|
void | add_row (const Vector< C > &) |
|
void | add_column (const Vector< C > &) |
|
void | eraseColumn (size_t) |
|
void | eraseRow (size_t) |
|
void | reset () |
|
This function inverts the matrix M. It is assumed that the coefficents are in an integral domain. At the conclusion of the process, d will contain the denominator for the inverted matrix (so that the true result is M/d).
If the matrix is not invertible, the resulting matrix is undefined, and d is set to 0.
We have chosen here to avoid divisions as much as possible. So in fact we take the matrix to diagonal form through elementary operations; from there we deduce the smallest possible denominator for the inverse, and the inverse matrix. We have to keep track of both row and column operations.