|
|
◆ zgbsv()
| void zgbsv |
( |
int |
n, |
|
|
int |
kl, |
|
|
int |
ku, |
|
|
int |
nrhs, |
|
|
int |
ldab, |
|
|
doublecomplex |
ab[], |
|
|
int |
ipiv[], |
|
|
int |
ldb, |
|
|
doublecomplex |
b[], |
|
|
int * |
info |
|
) |
| |
(Simple driver) Solution to system of linear equations AX = B for a complex band matrix
- Purpose
- This routine computes the solution to a complex system of linear equations where A is a band matrix of order n with kl sub-diagonals and ku super-diagonals, and X and B are n x nrhs matrices.
The LU decomposition with partial pivoting and row interchanges is used to factor A as where L is a product of permutation and unit lower triangular matrices with kl sub-diagonals, and U is upper triangular with kl+ku super-diagonals. The factored form of A is then used to solve the system of equations A * X = B.
- Parameters
-
| [in] | n | Number of linear equations, i.e., order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | kl | The number of sub-diagonals within the band of A. (kl >= 0) |
| [in] | ku | The number of super-diagonals within the band of A. (ku >= 0) |
| [in] | nrhs | Number of right hand sides, i.e., number of columns of the matrix B. (nrhs >= 0) (If nrhs = 0, returns without computation) |
| [in] | ldab | Leading dimension of the two dimensional array ab[][]. (ldab >= 2kl + ku + 1) |
| [in,out] | ab[][] | Array ab[lab][ldab] (lab >= n)
[in] The matrix A in band matrix form, in rows kl+1 to 2kl+ku+1; rows 1 to kl of the array need not be set.
[out] Details of the factorization: U is stored as an upper triangular band matrix with kl+ku super-diagonals in rows 1 to kl+ku+1, and the multipliers used during the factorization are stored in rows kl+ku+2 to 2*kl+ku+1. See below for further details. |
| [out] | ipiv() | Array ipiv[lipiv] (lipiv >= n)
Pivot indices that define the permutation matrix P; row i of the matrix was interchanged with row ipiv[i-1]. |
| [in] | ldb | Leading dimension of the two dimensional array b[][]. (ldb >= max(1, n)) |
| [in,out] | b[][] | Array b[lb][ldab] (lb >= nrhs)
[in] n x nrhs right hand side matrix B.
[out] If info = 0, n x nrhs solution matrix X. |
| [out] | info | = 0: Successful exit
= -1: The argument n had an illegal value (n < 0)
= -2: The argument kl had an illegal value (kl < 0)
= -3: The argument ku had an illegal value (ku < 0)
= -4: The argument nrhs had an illegal value (nrhs < 0)
= -5: The argument ldab had an illegal value (ldab < 2kl+ku+1)
= -8: The argument ldb had an illegal value (ldb < max(1, n))
= i > 0: The i-th diagonal element of the factor U is exactly zero. The factorization has been completed, but the factor U is exactly singular, and the solution has not been computed. |
- Further Details
- The band matrix form is illustrated by the following example, when n = 6, kl = 2, ku = 1:
On entry:
* * * + + +
* * + + + +
* a12 a23 a34 a45 a56
a11 a22 a33 a44 a55 a66
a21 a32 a43 a54 a65 *
a31 a42 a53 a64 * *
On exit:
* * * u14 u25 u36
* * u13 u24 u35 u46
* u12 u23 u34 u45 u56
u11 u22 u33 u44 u55 u66
m21 m32 m43 m54 m65 *
m31 m42 m53 m64 * *
Array elements marked * are not used by the routine; elements marked + need not be set on entry, but are required by the routine to store elements of U because of fill-in resulting from the row interchanges.
- Reference
- LAPACK
|