HP MLIB User's Guide Vol. 1 7th Ed.

Chapter 3 Basic Matrix Operations 303
Solve triangular band system STBSV/DTBSV/CTBSV/ZTBSV
Upper triangular storage
If A is a 9-by-9 upper-triangular band matrix with bandwidth kd = 3, for
example,
the upper triangular band part of A is stored in an array ab with at least
kd+1 = 4 rows and 9 columns:
where asterisks represent elements in the kd-by-kd triangle at the upper-left
corner of ab that are not referenced. Thus, if a
ij
is an element within the band of
A, it is stored in ab(kd+1+ij,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)
1112131400000
0222324250000
0 0 33 34 35 36 0 0 0
0 0 0 44 45 46 47 0 0
0000555657580
0000066676869
000000777879
00000008889
0000000099
* * * 14 25 36 47 58 69
* * 13 24 35 46 57 68 79
*1223344556677889
11 22 33 44 55 66 77 88 99