naginterfaces.library.lapacklin.dpptrf

naginterfaces.library.lapacklin.dpptrf(uplo, n, ap)[source]

dpptrf computes the Cholesky factorization of a real symmetric positive definite matrix, using packed storage.

For full information please refer to the NAG Library document for f07gd

https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/f07/f07gdf.html

Parameters
uplostr, length 1

Specifies whether the upper or lower triangular part of is stored and how is to be factorized.

The upper triangular part of is stored and is factorized as , where is upper triangular.

The lower triangular part of is stored and is factorized as , where is lower triangular.

nint

, the order of the matrix .

apfloat, array-like, shape

The symmetric matrix , packed by columns.

Returns
apfloat, ndarray, shape

If no exception or warning is raised, the factor or from the Cholesky factorization or , in the same storage format as .

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

The leading minor of order is not positive definite and the factorization could not be completed. Hence itself is not positive definite. This may indicate an error in forming the matrix . To factorize a symmetric matrix which is not positive definite, call dsptrf() instead.

Notes

dpptrf forms the Cholesky factorization of a real symmetric positive definite matrix either as if or if , where is an upper triangular matrix and is lower triangular, using packed storage.

References

Demmel, J W, 1989, On floating-point errors in Cholesky, LAPACK Working Note No. 14, University of Tennessee, Knoxville, https://www.netlib.org/lapack/lawnspdf/lawn14.pdf

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore