|
|
◆ WZhesv2()
| Function WZhesv2 |
( |
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 matrix (complex numbers in pairs of cells)
- Purpose
- WZhesv2 computes the solution to a complex system of linear equations where A is an N x N Hermitian matrix and X and B are N x Nrhs matrices.
The diagonal pivoting method is used to factor A as A = U * D * U^H, if Uplo = "U", or
A = L * D * L^H, if Uplo = "L",
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1 x 1 and 2 x 2 diagonal blocks. 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 element of D is exactly zero. The factorization has been completed, but the block diagonal matrix D is exactly singular, so the solution could not be 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] | A | (N x 2N) N x N Hermitian 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 matrix and
( 0.20 -0.11+0.93i 0.81-0.37i )
A = ( -0.11-0.93i -0.32 -0.80+0.92i )
( 0.81+0.37i -0.80-0.92i -0.29 )
( -0.1220+0.1844i )
B = ( 0.0034-0.4346i )
( 0.5339-0.1571i )
|