Function rc_algebra_invert_matrix¶
Defined in File algebra.h
Function Documentation¶
-
int rc_algebra_invert_matrix(rc_matrix_t A, rc_matrix_t *Ainv)¶
Inverts matrix A via LUP decomposition method.
Places the result in matrix Ainv. Any existing memory allocated for Ainv is freed if necessary and its contents are overwritten. Returns -1 if matrix is not invertible.
- Parameters
A – [in] input matrix
Ainv – [out] resulting inverted matrix
- Returns
Returns 0 on success or -1 on failure.