1ZLATBS(1) LAPACK auxiliary routine (version 3.1) ZLATBS(1)
2
3
4
6 ZLATBS - one of the triangular systems A * x = s*b, A**T * x = s*b,
7 or A**H * x = s*b,
8
10 SUBROUTINE ZLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
11 SCALE, CNORM, INFO )
12
13 CHARACTER DIAG, NORMIN, TRANS, UPLO
14
15 INTEGER INFO, KD, LDAB, N
16
17 DOUBLE PRECISION SCALE
18
19 DOUBLE PRECISION CNORM( * )
20
21 COMPLEX*16 AB( LDAB, * ), X( * )
22
24 ZLATBS solves one of the triangular systems
25
26 with scaling to prevent overflow, where A is an upper or lower triangu‐
27 lar band matrix. Here A' denotes the transpose of A, x and b are n-
28 element vectors, and s is a scaling factor, usually less than or equal
29 to 1, chosen so that the components of x will be less than the overflow
30 threshold. If the unscaled problem will not cause overflow, the Level
31 2 BLAS routine ZTBSV is called. If the matrix A is singular (A(j,j) =
32 0 for some j), then s is set to 0 and a non-trivial solution to A*x = 0
33 is returned.
34
35
37 UPLO (input) CHARACTER*1
38 Specifies whether the matrix A is upper or lower triangular. =
39 'U': Upper triangular
40 = 'L': Lower triangular
41
42 TRANS (input) CHARACTER*1
43 Specifies the operation applied to A. = 'N': Solve A * x =
44 s*b (No transpose)
45 = 'T': Solve A**T * x = s*b (Transpose)
46 = 'C': Solve A**H * x = s*b (Conjugate transpose)
47
48 DIAG (input) CHARACTER*1
49 Specifies whether or not the matrix A is unit triangular. =
50 'N': Non-unit triangular
51 = 'U': Unit triangular
52
53 NORMIN (input) CHARACTER*1
54 Specifies whether CNORM has been set or not. = 'Y': CNORM
55 contains the column norms on entry
56 = 'N': CNORM is not set on entry. On exit, the norms will be
57 computed and stored in CNORM.
58
59 N (input) INTEGER
60 The order of the matrix A. N >= 0.
61
62 KD (input) INTEGER
63 The number of subdiagonals or superdiagonals in the triangular
64 matrix A. KD >= 0.
65
66 AB (input) COMPLEX*16 array, dimension (LDAB,N)
67 The upper or lower triangular band matrix A, stored in the
68 first KD+1 rows of the array. The j-th column of A is stored in
69 the j-th column of the array AB as follows: if UPLO = 'U',
70 AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; if UPLO = 'L',
71 AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
72
73 LDAB (input) INTEGER
74 The leading dimension of the array AB. LDAB >= KD+1.
75
76 X (input/output) COMPLEX*16 array, dimension (N)
77 On entry, the right hand side b of the triangular system. On
78 exit, X is overwritten by the solution vector x.
79
80 SCALE (output) DOUBLE PRECISION
81 The scaling factor s for the triangular system A * x = s*b,
82 A**T * x = s*b, or A**H * x = s*b. If SCALE = 0, the matrix
83 A is singular or badly scaled, and the vector x is an exact or
84 approximate solution to A*x = 0.
85
86 CNORM (input or output) DOUBLE PRECISION array, dimension (N)
87
88 If NORMIN = 'Y', CNORM is an input argument and CNORM(j) con‐
89 tains the norm of the off-diagonal part of the j-th column of
90 A. If TRANS = 'N', CNORM(j) must be greater than or equal to
91 the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) must be
92 greater than or equal to the 1-norm.
93
94 If NORMIN = 'N', CNORM is an output argument and CNORM(j)
95 returns the 1-norm of the offdiagonal part of the j-th column
96 of A.
97
98 INFO (output) INTEGER
99 = 0: successful exit
100 < 0: if INFO = -k, the k-th argument had an illegal value
101
103 A rough bound on x is computed; if that is less than overflow, ZTBSV is
104 called, otherwise, specific code is used which checks for possible
105 overflow or divide-by-zero at every operation.
106
107 A columnwise scheme is used for solving A*x = b. The basic algorithm
108 if A is lower triangular is
109
110 x[1:n] := b[1:n]
111 for j = 1, ..., n
112 x(j) := x(j) / A(j,j)
113 x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
114 end
115
116 Define bounds on the components of x after j iterations of the loop:
117 M(j) = bound on x[1:j]
118 G(j) = bound on x[j+1:n]
119 Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
120
121 Then for iteration j+1 we have
122 M(j+1) <= G(j) / | A(j+1,j+1) |
123 G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
124 <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
125
126 where CNORM(j+1) is greater than or equal to the infinity-norm of col‐
127 umn j+1 of A, not counting the diagonal. Hence
128
129 G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
130 1<=i<=j
131 and
132
133 |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
134 1<=i< j
135
136 Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTBSV if the
137 reciprocal of the largest M(j), j=1,..,n, is larger than
138 max(underflow, 1/overflow).
139
140 The bound on x(j) is also used to determine when a step in the column‐
141 wise method can be performed without fear of overflow. If the computed
142 bound is greater than a large constant, x is scaled to prevent over‐
143 flow, but if the bound overflows, x is set to 0, x(j) to 1, and scale
144 to 0, and a non-trivial solution to A*x = 0 is found.
145
146 Similarly, a row-wise scheme is used to solve A**T *x = b or A**H *x =
147 b. The basic algorithm for A upper triangular is
148
149 for j = 1, ..., n
150 x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
151 end
152
153 We simultaneously compute two bounds
154 G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
155 M(j) = bound on x(i), 1<=i<=j
156
157 The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we add
158 the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1. Then the
159 bound on x(j) is
160
161 M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
162
163 <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
164 1<=i<=j
165
166 and we can safely call ZTBSV if 1/M(n) and 1/G(n) are both greater than
167 max(underflow, 1/overflow).
168
169
170
171
172 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 ZLATBS(1)