|
|
◆ WZposv2()
| Function WZposv2 |
( |
Uplo As |
String, |
|
|
N As |
Long, |
|
|
A As |
Variant, |
|
|
B As |
Variant, |
|
|
Optional Nrhs As |
Long = 1 |
|
) |
| |
Solution to system of linear equations AX = B for a Hermitian positive definite matrix (complex numbers in pairs of cells)
- Purpose
- WZposv2 computes the solution to a complex system of linear equations where A is an N x N Hermitian positive definite 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 matrix and L is a lower triangular matrix. The factored form of A is then used to solve the system of equations A * X = B.
To represent complex numbers, a real part and an imaginary part are stored in a pair of adjacent cells (a real part in a left cell, and an imaginary part in a right cell). The computed results are stored in the same way.
- Returns
- N+1 x 2Nrhs
| Column 1 | Column 2 | . . . | Column 2Nrhs |
| Rows 1 to N | Solution matrix X (a real part and an imaginary part are stored in a pair of adjacent columns (a real part is left and an imaginary part is right)) |
| Row N+1 | Reciprocal condition number | Return code | . . . | 0 |
Return code.
= 0: Successful exit.
= i > 0: The i-th diagonal element of the factor is zero. (Matrix A is singular)
- 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] | A | (N x 2N) N x N Hermitian positive definite matrix A. Upper or lower triangular part is to be referenced according to Uplo. |
| [in] | B | (N x 2Nrhs) N x Nrhs right hand side matrix B. |
| [in] | Nrhs | (Optional)
Number of columns of right hand side matrix B. (Nrhs >= 1) (default = 1) |
- 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 an Hermitian positive definite matrix and
( 2.20 -0.11+0.93i 0.81-0.37i )
A = ( -0.11-0.93i 2.32 -0.80+0.92i )
( 0.81+0.37i -0.80-0.92i 2.29 )
( 1.5980+1.4644i )
B = ( 1.3498+1.4398i )
( 2.0561-0.5441i )
|