XLPack 6.1
Excel VBA Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ Zpttrs()

Sub Zpttrs ( Uplo As  String,
N As  Long,
D() As  Double,
E() As  Complex,
B() As  Complex,
Info As  Long,
Optional Nrhs As  Long = 1 
)

Solution to factorized system of linear equations AX = B for a Hermitian positive definite tridiagonal matrix

Purpose
This routine solves a tridiagonal system of the form
A * X = B
using the factorization A = U^H*D*U or A = L*D*L^H computed by zpttrf. D is a diagonal matrix specified in the array D(), U (or L) is a unit bidiagonal matrix whose super-diagonal (sub-diagonal) is specified in the array E(), and X and B are n x nrhs matrices.
Parameters
[in]UploSpecifies the form of the factorization and whether the vector E() is the super-diagonal of the upper bidiagonal factor U or the sub-diagonal of the lower bidiagonal factor L.
= "U": A = U^H*D*U, E() is the super-diagonal of U.
= "L": A = L*D*L^H, E() is the sub-diagonal of L.
[in]NOrder of the matrix A. (N >= 0) (If N = 0, returns without computation)
[in]D()Array D(LD - 1) (LD >= N)
N diagonal elements of the diagonal matrix D from the factorization A = U^H*D*U or A = L*D*L^H.
[in]E()Array E(LE - 1) (LE >= N - 1)
N-1 super-diagonal or sub-diagonal elements of the unit bidiagonal factor U or L from the factorization A = U^H*D*U or A = L*D*L^H.
[in,out]B()Array B(LB1 - 1, LB2 - 1) (LB1 >= max(1, N), LB2 >= Nrhs) (2D array) or B(LB - 1) (LB >= max(1, N), Nrhs = 1) (1D array)
[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 D() is invalid.
= -4: The argument E() is invalid.
= -5: The argument B() is invalid.
= -7: The argument Nrhs had an illegal value. (Nrhs < 0)
[in]Nrhs(Optional)
Number of right hand sides, i.e., number of columns of the matrix B. (Nrhs >= 0) (If Nrhs = 0, returns without computation) (default = 1)
Reference
LAPACK
Example Program
See example of Zpttrf.