|
|
◆ WDpbsv()
| Function WDpbsv |
( |
Uplo As |
String, |
|
|
N As |
Long, |
|
|
Kd As |
Long, |
|
|
Ab As |
Variant, |
|
|
B As |
Variant, |
|
|
Optional Nrhs As |
Long = 1 |
|
) |
| |
Solution to system of linear equations AX = B for a symmetric positive definite band matrix
- Purpose
- WDpbsv computes the solution to a real system of linear equations where A is an N x N symmetric positive definite band matrix, and X and B are N x Nrhs matrices.
The Cholesky decomposition is used to factor A as A = U^T*U, if Uplo = "U", or
A = L*L^T, 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.
- Returns
- N+2 x Nrhs
| Column 1 | Column 2 | . . . | Column Nrhs |
| Rows 1 to N | Solution matrix X |
| Row N+1 | Reciprocal condition number | 0 | . . . | 0 |
| Row N+2 | Return code | 0 | . . . | 0 |
Return code.
= 0: Successful exit.
= 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.
- Parameters
-
| [in] | Uplo | = "U": Upper triangle of A is stored.
= "L": Lower triangle of A is stored. |
| [in] | N | Number of linear equations, i.e., order of the matrix A. (N >= 1) |
| [in] | Kd | Number of superdiagonals or subdiagonals of the matrix A. (Kd >= 0) |
| [in] | Ab | (Kd+1 x N) N x N coefficient matrix A. (Symmetric band matrix form. See below for details) |
| [in] | B | (N x Nrhs) N x Nrhs right hand side matrix B. |
| [in] | Nrhs | (Optional)
Number of columns of right hand side matrix B. (Nrhs >= 1) (default = 1) |
- Further Details
- The symmetric band matrix form is illustrated by the following example, when n = 6, kd = 2, and uplo = "U":
* * a13 a24 a35 a46
* a12 a23 a34 a45 a56
a11 a22 a33 a44 a55 a66
Similarly, if uplo = "L" the format of A is as follows: a11 a22 a33 a44 a55 a66
a21 a32 a43 a54 a65 *
a31 a42 a53 a64 * *
Array elements marked * are not used by the routine.
- Reference
- LAPACK
- Example
- Solve the system of linear equations Ax = B and estimate the reciprocal of the condition number (RCond) of A, where A is symmetric and
( 2.2 -0.11 -0.32 ) ( -1.5660 )
A = ( -0.11 2.93 0.81 ), B = ( -2.8425 )
( -0.32 0.81 -2.37 ) ( -1.1765 )
|