|
◆ Zgttrs()
Sub Zgttrs |
( |
Trans As |
String, |
|
|
N As |
Long, |
|
|
Dl() As |
Complex, |
|
|
D() As |
Complex, |
|
|
Du() As |
Complex, |
|
|
Du2() As |
Complex, |
|
|
IPiv() As |
Long, |
|
|
B() As |
Complex, |
|
|
Info As |
Long, |
|
|
Optional Nrhs As |
Long = 1 |
|
) |
| |
Solution to LU factorized system of linear equations AX = B, ATX = B or AHX = B for a complex tridiagonal matrix
- Purpose
- This routine solves one of the system of equations
A * X = B, A^T * X = B or A^H * X = B
with a tridiagonal matrix A using the LU factorization computed by Zgttrf.
- Parameters
-
[in] | Trans | Specifies the form of the system of equations:
= "N": A * X = B. (no transpose)
= "T": A^T * X = B. (transpose)
= "C": A^H * X = B. (conjugate transpose) |
[in] | N | Order of the matrix A. (N >= 0) (If N = 0, returns without computation) |
[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 Dgttrf. |
[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,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 matrix of right hand side matrix B.
[out] If Info = 0, the N x Nrhs solution matrix X. |
[out] | Info | = 0: Successful exit.
= -1: The argument Trans had an illegal value. (Trans <> "N", "T" nor "C")
= -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 B() is invalid.
= -10: 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 Zgttrf.
|