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

◆ Zgtcon()

Sub Zgtcon ( Norm As  String,
N As  Long,
Dl() As  Complex,
D() As  Complex,
Du() As  Complex,
Du2() As  Complex,
IPiv() As  Long,
ANorm As  Double,
RCond As  Double,
Info As  Long 
)

Condition number of a complex tridiagonal matrix

Purpose
This routine estimates the reciprocal of the condition number of a complex tridiagonal matrix A using the LU factorization as computed by Zgttrf.

An estimate is obtained for norm(inv(A)), and the reciprocal of the condition number is computed as
RCond = 1 / (norm(A) * norm(inv(A))).
Parameters
[in]NormSpecifies whether the 1-norm condition number or the infinity-norm condition number is required.
= "1" or "O": 1-norm
= "I": Infinity-norm
[in]NOrder of the matrix A. (N >= 0) (If N = 0, returns RCond = 1)
[in]Dl()Array Dl(LDl - 1) (LDl >= N - 1)
N-1 multipliers that define the matrix L from the LU factorization of A as computed by Zgttrf.
[in]D()Array D(LD - 1) (LD >= N)
N diagonal elements of the upper triangular matrix U from the LU factorization of A.
[in]Du()Array Du(LDu - 1) (LDu >= N - 1)
N-1 elements of the first super-diagonal of U.
[in]Du2()Array Du2(LDu2 - 1) (LDu2 >= N - 2)
N-2 elements of the second super-diagonal of U.
[in]IPiv()Array IPiv(LIPiv - 1) (LIPiv >= N)
Pivot indices; for 1 <= i <= N, row i of the matrix was interchanged with row IPiv(i-1). IPiv(i-1) will always be either i or i+1; IPiv(i-1) = i indicates a row interchange was not required.
[in]ANormNorm = "1" or "O": The 1-norm of the original matrix A (ANorm >= 0)
Norm = "I": The infinity-norm of the original matrix A (ANorm >= 0)
[out]RCondThe reciprocal of the condition number of the matrix A, computed as RCond = 1/(ANorm * Ainvnm), where Ainvnm is an estimate of the 1-norm of inv(A) computed in this routine.
[out]Info= 0: Successful exit.
= -1: The argument Norm had an illegal value. (Norm <> "1", "O" nor "I")
= -2: The argument N had an illegal value. (N < 0)
= -3: The argument Dl() is invalid.
= -4: The argument D() is invalid.
= -5: The argument Du() is invalid.
= -6: The argument Du2() is invalid.
= -7: The argument IPiv() is invalid.
= -8: The argument ANorm had an illegal value. (ANorm < 0)
Reference
LAPACK
Example Program
See example of Zgtsv.