STBSV and DTBSV solve one of the following triangular banded systems of
equations with a single right-hand side, using the vector x and
triangular band matrix A or its transpose:
Solution | Equation |
---|---|
1. x<--A-1x | Ax = b |
2. x<--A-Tx | ATx = b |
CTBSV and ZTBSV solve one of the following triangular banded systems of
equations with a single right-hand side, using the vector x and
triangular band matrix A, its transpose, or its conjugate
transpose:
Solution | Equation |
---|---|
1. x<--A-1x | Ax = b |
2. x<--A-Tx | ATx = b |
3. x<--A-Hx | AHx = b |
Matrix A can be either upper or lower triangular and is stored
in upper- or lower-triangular-band-packed storage mode, respectively.
A, x | Subprogram |
Short-precision real | STBSV |
Long-precision real | DTBSV |
Short-precision complex | CTBSV |
Long-precision complex | ZTBSV |
Fortran | CALL STBSV | DTBSV | CTBSV | ZTBSV (uplo, trans, diag, n, k, a, lda, x, incx) |
C and C++ | stbsv | dtbsv | ctbsv | ztbsv (uplo, trans, diag, n, k, a, lda, x, incx); |
PL/I | CALL STBSV | DTBSV | CTBSV | ZTBSV (uplo, trans, diag, n, k, a, lda, x, incx); |
If uplo = 'U', A is an upper triangular matrix.
If uplo = 'L', A is a lower triangular matrix.
Specified as: a single character. It must be 'U' or 'L'.
If trans = 'N', A is used, resulting in solution 1.
If trans = 'T', AT is used, resulting in solution 2.
If trans = 'C', AH is used, resulting in solution 3.
Specified as: a single character. It must be 'N', 'T', or 'C'.
If diag = 'U', A is a unit triangular matrix.
If diag = 'N', A is not a unit triangular matrix.
Specified as: a single character. It must be 'U' or 'N'.
These subroutines solve a triangular banded system of equations with a single right-hand side. The solution, x, may be any of the following, where triangular band matrix A, its transpose, or its conjugate transpose is used, and where A can be either upper- or lower-triangular:
where:
See references [34], [46], and [38]. If n is 0, no computation is performed.
None
This example shows the solution x<--A-1x. Matrix A is a real 9 by 9 upper triangular band matrix with an upper band width of 2 that is not unit triangular, stored in upper-triangular-band-packed storage mode. Vector x is a vector of length 9, where matrix A is:
* * | 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 4.0 2.0 3.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 4.0 1.0 1.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 4.0 2.0 2.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 3.0 1.0 1.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 3.0 2.0 2.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 3.0 1.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 2.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 | * *
UPLO TRANS DIAG N K A LDA X INCX | | | | | | | | | CALL STBSV( 'U' , 'N' , 'N' , 9 , 2 , A , 3 , X , 1 )
* * | . . 1.0 3.0 1.0 2.0 1.0 2.0 0.0 | A = | . 1.0 2.0 1.0 2.0 1.0 2.0 1.0 2.0 | | 1.0 4.0 4.0 4.0 3.0 3.0 3.0 2.0 1.0 | * * X = (2.0, 7.0, 1.0, 8.0, 2.0, 8.0, 1.0, 8.0, 3.0)
X = (1.0, 1.0, 0.0, 1.0, 0.0, 2.0, 0.0, 1.0, 3.0)
This example shows the solution x<--A-Tx, solving the same system as in Example 1. Matrix A is a real 9 by 9 lower triangular band matrix with a lower band width of 2 that is not unit triangular, stored in lower-triangular-band-packed storage mode. Vector x is a vector of length 9 where matrix A is:
* * | 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 1.0 4.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 1.0 2.0 4.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 3.0 1.0 4.0 0.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 1.0 2.0 3.0 0.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 2.0 1.0 3.0 0.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 1.0 2.0 3.0 0.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 2.0 1.0 2.0 0.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 1.0 | * *
UPLO TRANS DIAG N K A LDA X INCX | | | | | | | | | CALL STBSV( 'L' , 'T' , 'N' , 9 , 2 , A , 3 , X , 1 )
* * | 1.0 4.0 4.0 4.0 3.0 3.0 3.0 2.0 1.0 | A = | 1.0 2.0 1.0 2.0 1.0 2.0 1.0 2.0 . | | 1.0 3.0 1.0 2.0 1.0 2.0 0.0 . . | * *
This example shows the solution x<--A-Tx, where k > n. Matrix A is a real 4 by 4 upper triangular band matrix with an upper band width of 3, even though k is specified as 5. It is not unit triangular and is stored in upper-triangular-band-packed storage mode. Vector x is a vector of length 4 where matrix A is:
* * | 1.0 2.0 3.0 2.0 | | 0.0 2.0 2.0 5.0 | | 0.0 0.0 3.0 3.0 | | 0.0 0.0 0.0 1.0 | * *
UPLO TRANS DIAG N K A LDA X INCX | | | | | | | | | CALL STBSV( 'U' , 'T' , 'N' , 4 , 5 , A , 6 , X , 1 )
* * | . . . . | | . . . . | A = | . . . 2.0 | | . . 3.0 5.0 | | . 2.0 2.0 3.0 | | 1.0 2.0 3.0 1.0 | * * X = (5.0, 18.0, 32.0, 41.0)
X = (5.0, 4.0, 3.0, 2.0)
This example shows the solution x<--A-Tx. Matrix A is a complex 7 by 7 lower triangular band matrix with a lower band width of 3 that is not unit triangular, stored in lower-triangular-band-packed storage mode. Vector x is a vector of length 7. Matrix A is:
* * | (1.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) | | (1.0, 2.0) (2.0, 1.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) | | (1.0, 3.0) (2.0, 2.0) (3.0, 1.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) | | (1.0, 4.0) (2.0, 3.0) (3.0, 3.0) (4.0, 1.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) | | (0.0, 0.0) (2.0, 4.0) (3.0, 3.0) (4.0, 2.0) (2.0, 1.0) (0.0, 0.0) (0.0, 0.0) | | (0.0, 0.0) (0.0, 0.0) (3.0, 3.0) (4.0, 3.0) (5.0, 1.0) (3.0, 1.0) (0.0, 0.0) | | (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (4.0, 4.0) (5.0, 2.0) (6.0, 1.0) (2.0, 1.0) | * *
UPLO TRANS DIAG N K A LDA X INCX | | | | | | | | | CALL CTBSV( 'L' , 'T' , 'N' , 7 , 3 , A , 4 , X , 1 )
* * | (1.0, 0.0) (2.0, 1.0) (3.0, 1.0) (4.0, 1.0) (2.0, 1.0) (3.0, 1.0) (2.0, 1.0) | A = | (1.0, 2.0) (2.0, 2.0) (3.0, 3.0) (4.0, 2.0) (5.0, 1.0) (6.0, 1.0) . | | (1.0, 3.0) (2.0, 3.0) (3.0, 3.0) (4.0, 3.0) (5.0, 2.0) . . | | (1.0, 4.0) (2.0, 4.0) (3.0, 3.0) (4.0, 4.0) . . . | * *
X = ((2.0, 2.0), (7.0, 1.0), (1.0, 1.0), (8.0, 1.0), (2.0, 0.0), (8.0, 1.0), (1.0, 2.0))
X = ((-12.048, -13.136), (6.304, -1.472), (-1.880, 1.040), (2.600, -1.800), (-2.160, 1.880), (0.800, -1.400), (0.800, 0.600))