STBMV and DTBMV compute one of the following matrix-vector products, using the vector x and triangular band matrix A or its transpose:
CTBMV and ZTBMV compute one of the following matrix-vector products, using the vector x and triangular band matrix A, its transpose, or its conjugate transpose:
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 | STBMV |
Long-precision real | DTBMV |
Short-precision complex | CTBMV |
Long-precision complex | ZTBMV |
Fortran | CALL STBMV | DTBMV | CTBMV | ZTBMV (uplo, transa, diag, n, k, a, lda, x, incx) |
C and C++ | stbmv | dtbmv | ctbmv | ztbmv (uplo, transa, diag, n, k, a, lda, x, incx); |
PL/I | CALL STBMV | DTBMV | CTBMV | ZTBMV (uplo, transa, 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 transa = 'N', A is used in the computation.
If transa = 'T', AT is used in the computation.
If transa = 'C', AH is used in the computation.
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 can perform the following matrix-vector product computations, using the triangular band matrix A, its transpose, or its conjugate transpose, 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 computation x<--Ax. Matrix A is a real 7 by 7 upper triangular band matrix with a half band width of 3 that is not unit triangular, stored in upper-triangular-band-packed storage mode. Vector x is a vector of length 7. Matrix A is:
* * | 1.0 1.0 1.0 1.0 0.0 0.0 0.0 | | 0.0 2.0 2.0 2.0 2.0 0.0 0.0 | | 0.0 0.0 3.0 3.0 3.0 3.0 0.0 | | 0.0 0.0 0.0 4.0 4.0 4.0 4.0 | | 0.0 0.0 0.0 0.0 5.0 5.0 5.0 | | 0.0 0.0 0.0 0.0 0.0 6.0 6.0 | | 0.0 0.0 0.0 0.0 0.0 0.0 7.0 | * *
UPLO TRANSA DIAG N K A LDA X INCX | | | | | | | | | CALL STBMV( 'U' , 'N' , 'N' , 7 , 3 , A , 5 , X , 1 ) * * | . . . 1.0 2.0 3.0 4.0 | | . . 1.0 2.0 3.0 4.0 5.0 | A = | . 1.0 2.0 3.0 4.0 5.0 6.0 | | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 | | . . . . . . . | * * X = (1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0)
X = (10.0, 28.0, 54.0, 88.0, 90.0, 78.0, 49.0)
This example shows the computation x<--ATx. Matrix A is a real 7 by 7 lower triangular band matrix with a half 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 | | 1.0 2.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 | | 1.0 2.0 3.0 4.0 0.0 0.0 0.0 | | 0.0 2.0 3.0 4.0 5.0 0.0 0.0 | | 0.0 0.0 3.0 4.0 5.0 6.0 0.0 | | 0.0 0.0 0.0 4.0 5.0 6.0 7.0 | * *
UPLO TRANSA DIAG N K A LDA X INCX | | | | | | | | | CALL STBMV( 'L' , 'T' , 'N' , 7 , 3 , A , 5 , X , 1 ) * * | 1.0 2.0 3.0 4.0 5.0 6.0 7.0 | | 1.0 2.0 3.0 4.0 5.0 6.0 . | A = | 1.0 2.0 3.0 4.0 5.0 . . | | 1.0 2.0 3.0 4.0 . . . | | . . . . . . . | * * X = (1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0)
X = (10.0, 28.0, 54.0, 88.0, 90.0, 78.0, 49.0)
This example shows the computation x<--AHx. Matrix A is a complex 7 by 7 upper triangular band matrix with a half band width of 3 that is not unit triangular, stored in upper-triangular-band-packed storage mode. Vector x is a vector of length 7. Matrix A is:
* * | (1.0, 1.0) (1.0, 1.0) (1.0, 1.0) (1.0, 1.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) | | (0.0, 0.0) (2.0, 2.0) (2.0, 2.0) (2.0, 2.0) (2.0, 2.0) (0.0, 0.0) (0.0, 0.0) | | (0.0, 0.0) (0.0, 0.0) (3.0, 3.0) (3.0, 3.0) (3.0, 3.0) (3.0, 3.0) (0.0, 0.0) | | (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (4.0, 4.0) (4.0, 4.0) (4.0, 4.0) (4.0, 4.0) | | (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (5.0, 5.0) (5.0, 5.0) (5.0, 5.0) | | (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (0.0, 0.0) (6.0, 6.0) (6.0, 6.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) (7.0, 7.0) | * *
UPLO TRANSA DIAG N K A LDA X INCX | | | | | | | | | CALL CTBMV( 'U' , 'C' , 'N' , 7 , 3 , A , 5 , X , 1 )
* * | . . . (1.0, 1.0) (2.0, 2.0) (3.0, 3.0) (4.0, 4.0) | | . . (1.0, 1.0) (2.0, 2.0) (3.0, 3.0) (4.0, 4.0) (5.0, 5.0) | A = | . (1.0, 1.0) (2.0, 2.0) (3.0, 3.0) (4.0, 4.0) (5.0, 5.0) (6.0, 6.0) | | (1.0, 1.0) (2.0, 2.0) (3.0, 3.0) (4.0, 4.0) (5.0, 5.0) (6.0, 6.0) (7.0, 7.0) | | . . . . . . . | * *
X = ((1.0, 2.0), (2.0, 4.0), (3.0, 6.0), (4.0, 8.0), (5.0, 10.0), (6.0, 12.0), (7.0, 14.0))
X = ((1.0, 2.0), (7.0, 9.0), (24.0, 23.0), (58.0, 46.0), (112.0, 79.0), (186.0, 122.0), (280.0, 175.0))
This example shows the computation x<--ATx, where k > n. Matrix A is a real 4 by 4 upper triangular band matrix with a half band width of 5 that is not unit triangular, stored in upper-triangular-band-packed storage mode. Vector x is a vector of length 4. Matrix A is:
* * | 1.0 1.0 1.0 1.0 | | . 2.0 2.0 2.0 | | . . 3.0 3.0 | | . . . 4.0 | * *
UPLO TRANSA DIAG N K A LDA X INCX | | | | | | | | | CALL STBMV( 'U' , 'T' , 'N' , 4 , 5 , A , 6 , X , 1 ) * * | . . . . | A = | . . . . | | . . . 1.0 | | . . 1.0 2.0 | | . 1.0 2.0 3.0 | | 1.0 2.0 3.0 4.0 | * * X = (1.0, 2.0, 3.0, 4.0)
X = (1.0, 5.0, 14.0, 30.0)