Solve triangular band system | STBSV/DTBSV/CTBSV/ZTBSV |
Upper triangular storage
If A is a
11 | 12 | 13 | 14 | 0 | 0 | 0 | 0 | 0 |
0 | 22 | 23 | 24 | 25 | 0 | 0 | 0 | 0 |
0 | 0 | 33 | 34 | 35 | 36 | 0 | 0 | 0 |
0 | 0 | 0 | 44 | 45 | 46 | 47 | 0 | 0 |
0 | 0 | 0 | 0 | 55 | 56 | 57 | 58 | 0 |
0 | 0 | 0 | 0 | 0 | 66 | 67 | 68 | 69 |
0 | 0 | 0 | 0 | 0 | 0 | 77 | 78 | 79 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 89 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 |
the upper triangular band part of A is stored in an array ab with at least kd+1 = 4 rows and 9 columns:
* | * | * | 14 | 25 | 36 | 47 | 58 | 69 |
* | * | 13 | 24 | 35 | 46 | 57 | 68 | 79 |
* | 12 | 23 | 34 | 45 | 56 | 67 | 78 | 89 |
11 | 22 | 33 | 44 | 55 | 66 | 77 | 88 | 99 |
where asterisks represent elements in the
A, it is stored in ab(kd+1+i−j,j). Therefore, the columns of A are stored in the columns of ab, and the diagonals of A are stored in the rows of ab, with the principal diagonal in row kd+1, the first superdiagonal starting in the second position in row kd, and so on.
Usage | VECLIB: |
|
| CHARACTER*1 | uplo, trans, diag |
| INTEGER*4 | n, kd, ldab, incx |
| REAL*4 | ab(ldab, n), x(lenx) |
CALL STBSV(uplo, trans, diag, n, kd, ab, ldab, x, incx)
CHARACTER*1 | uplo, trans, diag |
INTEGER*4 | n, kd, ldab, incx |
REAL*8 | ab(ldab, n), x(lenx) |
CALL DTBSV(uplo, trans, diag, n, kd, ab, ldab, x, incx)
Chapter 3 Basic Matrix Operations 303