XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ zppsv()

void zppsv ( char  uplo,
int  n,
int  nrhs,
doublecomplex  ap[],
int  ldb,
doublecomplex  b[],
int *  info 
)

(Simple driver) Solution to system of linear equations AX = B for a Hermitian positive definite matrix in packed form

Purpose
This routine computes the solution to a complex system of linear equations
A * X = B,
where A is an n x n Hermitian positive definite matrix stored in packed form and X and B are n x nrhs matrices.

The Cholesky decomposition is used to factor A as
A = U^H * U, if uplo = 'U', or
A = L * L^H, if uplo = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.
Parameters
[in]uplo= 'U': Upper triangle of A is stored.
= 'L': Lower triangle of A is stored.
[in]nNumber of linear equations, i.e., order of the matrix A. (n >= 0) (If n = 0, returns without computation)
[in]nrhsNumber of right hand sides, i.e., number of columns of the matrix B. (nrhs >= 0) (if nrhs = 0, returns without computation)
[in,out]ap[]Array ap[lap] (lap >= n(n + 1)/2)
[in] n x n Hermitian positive definite matrix A in packed form. The upper or lower part is to be stored in accordance with uplo.
[out] If info = 0, the factor U or L from the Cholesky factorization A = U^H*U or A = L*L^H.
[in]ldbLeading dimension of the two dimensional array b[][]. (ldb >= max(1, n))
[in,out]b[][]Array b[lb][ldb] (lb >= nrhs)
[in] n x nrhs right hand side matrix B.
[out] If info=0, the n x nrhs solution matrix X.
[out]info= 0: Successful exit
= -1: The argument uplo had an illegal value (uplo != 'U' nor 'L')
= -2: The argument n had an illegal value (n < 0)
= -3: The argument nrhs had an illegal value (nrhs < 0)
= -5: The argument ldb had an illegal value (ldb < max(1, n))
= i > 0: The leading minor of order i of A is not positive definite, so the factorization could not be completed, and the solution has not been computed.
Reference
LAPACK