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

◆ zpbsv()

void zpbsv ( char  uplo,
int  n,
int  kd,
int  nrhs,
int  ldab,
doublecomplex  ab[],
int  ldb,
doublecomplex  b[],
int *  info 
)

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

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 band matrix, 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 band matrix, and L is a lower triangular band matrix, with the same number of super-diagonals or sub-diagonals as A. 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]kdNumber of super-diagonals of the matrix A if uplo = 'U', or number of sub-diagonals if uplo = 'L'. (kd >= 0)
[in]nrhsNumber of right hand sides, i.e., number of columns of the matrix B. (nrhs >= 0) (If nrhs = 0, returns without computation)
[in]ldabLeading dimension of the two dimensional array ab[][]. (ldab >= kd + 1)
[in,out]ab[][]Array ab[lab][ldab] (lab >= n)
[in] n x n Hermitian positive definite band matrix A in kd+1 x n symmetric band matrix form. Upper or lower part is to be stored in accordance with uplo. See below for further details.
[out] If info = 0, the triangular factor U or L from the Cholesky factorization A = U^H*U or A = L*L^H of the band matrix A, in the same storage format as A.
[in]ldbLeading dimension of the two dimensional array b[][]. (ldb >= max(1, n))
[in,out]b[][]Array b[lb][ldab] (lb >= nrhs)
[in] n x nrhs right hand side matrix B.
[out] If info = 0, 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 kd had an illegal value (kd < 0)
= -4: The argument nrhs had an illegal value (nrhs < 0)
= -5: The argument ldab had an illegal value (ldab < kd+1)
= -7: 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
Further Details
The symmetric band matrix form is illustrated by the following example, when n = 6, kd = 2, and uplo = "U":
On entry:

   *    *   a13  a24  a35  a46
   *   a12  a23  a34  a45  a56
  a11  a22  a33  a44  a55  a66

On exit:

   *    *   u13  u24  u35  u46
   *   u12  u23  u34  u45  u56
  u11  u22  u33  u44  u55  u66
Similarly, if uplo = "L" the format of A is as follows:
On entry:

  a11  a22  a33  a44  a55  a66
  a21  a32  a43  a54  a65   *
  a31  a42  a53  a64   *    *

On exit:

  l11  l22  l33  l44  l55  l66
  l21  l32  l43  l54  l65   *
  l31  l42  l53  l64   *    *
Array elements marked * are not used by the routine.
Reference
LAPACK