|
Macaulay2 Engine
|
| bool MatrixOps::inverse | ( | const Mat & | A, |
| Mat & | result_inv ) |
the inverse of a square matrix
result_inv is set to the inverse of the square matrix A, if A is invertible. result_inv should be a Mat, with the same ring/type as the input matrix A. result_inv does not need to be the same size as A, it will be resized if needed. returns true exactly when the matrix is invertible, and result_inv has been set.
throws an engine_error for ring/matrix types where the function is not implemented. throws an error if the matrix is not square.
Note: the inverse of a 0 x 0 matrix is another 0 x 0 matrix.
Definition at line 156 of file mat-linalg.hpp.
Referenced by MutableMat< Mat >::invert().