naginterfaces.library.matop.real_symm_posdef_inv¶
- naginterfaces.library.matop.real_symm_posdef_inv(a)[source]¶
real_symm_posdef_inv
calculates the accurate inverse of a real symmetric positive definite matrix, using a Cholesky factorization and iterative refinement.For full information please refer to the NAG Library document for f01ab
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f01/f01abf.html
- Parameters
- afloat, array-like, shape
The upper triangle of the positive definite symmetric matrix . The elements of the array below the diagonal need not be set.
- Returns
- afloat, ndarray, shape
The lower triangle of the inverse matrix is stored in the elements of the array below the diagonal, in rows to ; is stored in for . The upper triangle of the original matrix is unchanged.
- bfloat, ndarray, shape
The lower triangle of the inverse matrix , with stored in , for .
- Raises
- NagValueError
- (errno )
The matrix is not positive definite, possibly due to rounding errors.
- (errno )
The refinement process failed to converge. The matrix is ill-conditioned.
- (errno )
On entry, .
Constraint: .
- Notes
No equivalent traditional C interface for this routine exists in the NAG Library.
To compute the inverse of a real symmetric positive definite matrix ,
real_symm_posdef_inv
first computes a Cholesky factorization of as , where is lower triangular. An approximation to is found by computing and then the product . The residual matrix is calculated using additional precision, and a correction to is found by solving . is replaced by , and this iterative refinement of the inverse is repeated until full machine accuracy has been obtained.
- References
Wilkinson, J H and Reinsch, C, 1971, Handbook for Automatic Computation II, Linear Algebra, Springer–Verlag