naginterfaces.library.matop.real_mod_chol_perturbed_a¶
- naginterfaces.library.matop.real_mod_chol_perturbed_a(uplo, a, offdiag, ipiv)[source]¶
real_mod_chol_perturbed_a
computes the positive definite perturbed matrix from the factors of a modified Cholesky factorization of a real symmetric matrix, .For full information please refer to the NAG Library document for f01me
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f01/f01mef.html
- Parameters
- uplostr, length 1
Indicates whether the upper or lower triangular part of was stored and how it was factorized.
The upper triangular part of was stored and we compute such that .
The lower triangular part of was stored and we compute such that .
- afloat, array-like, shape
The modified Cholesky factor of , as returned by
real_modified_cholesky()
.- offdiagfloat, array-like, shape
The array as returned by
real_modified_cholesky()
.- ipivint, array-like, shape
The array as returned by
real_modified_cholesky()
.
- Returns
- afloat, ndarray, shape
If , the upper triangular part of is returned and the elements of the array below the diagonal are not referenced.
If , the lower triangular part of is returned and the elements of the array above the diagonal are not referenced.
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: or .
- (errno )
On entry, .
Constraint: .
- Notes
real_mod_chol_perturbed_a
computes the positive definite perturbed matrix from the factors provided by a previous call toreal_modified_cholesky()
. For a symmetric, possibly indefinite matrix ,real_modified_cholesky()
finds the Cheng–Higham modified Cholesky factorizationwhen . Here is a unit lower triangular matrix, is a permutation matrix, is a symmetric block diagonal matrix (with blocks of order or ). The matrix is not explicitly formed.
If , we compute from the factorization , where is a unit upper triangular matrix.
- References
Cheng, S H and Higham, N J, 1998, A modified Cholesky algorithm based on a symmetric indefinite factorization, SIAM J. Matrix Anal. Appl. (19(4)), 1097–1110