# naginterfaces.library.lapacklin.zpstrf¶

naginterfaces.library.lapacklin.zpstrf(uplo, n, a, tol=- 1)[source]

zpstrf computes the Cholesky factorization with complete pivoting of a complex Hermitian positive semidefinite matrix.

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

https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/f07/f07krf.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 .

acomplex, array-like, shape

The Hermitian positive semidefinite matrix .

tolfloat, optional

User defined tolerance. If , will be used. The algorithm terminates at the th step if the th step pivot .

Returns
acomplex, ndarray, shape

If , the first rows of the upper triangle of are overwritten with the nonzero elements of the Cholesky factor , and the remaining rows of the triangle are destroyed.

If , the first columns of the lower triangle of are overwritten with the nonzero elements of the Cholesky factor , and the remaining columns of the triangle are destroyed.

pivint, ndarray, shape

is such that the nonzero entries of are , for .

rankint

The computed rank of given by the number of steps the algorithm completed.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: or .

(errno )

On entry, error in parameter .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

The matrix is not positive definite. It is either positive semidefinite with computed rank as returned in and less than , or it may be indefinite, see Further Comments.

Notes

zpstrf forms the Cholesky factorization of a complex Hermitian positive semidefinite matrix either as if or if , where is a permutation matrix, is an upper triangular matrix and is lower triangular.

This algorithm does not attempt to check that is positive semidefinite.

References

Higham, N J, 2002, Accuracy and Stability of Numerical Algorithms, (2nd Edition), SIAM, Philadelphia

Lucas, C, 2004, LAPACK-style codes for Level 2 and 3 pivoted Cholesky factorizations, LAPACK Working Note No. 161. Technical Report CS-04-522, Department of Computer Science, University of Tennessee, 107 Ayres Hall, Knoxville, TN 37996-1301, USA, https://www.netlib.org/lapack/lawnspdf/lawn161.pdf