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