1CLATPS(1)           LAPACK auxiliary routine (version 3.2)           CLATPS(1)
2
3
4

NAME

6       CLATPS - solves one of the triangular systems   A * x = s*b, A**T * x =
7       s*b, or A**H * x = s*b,
8

SYNOPSIS

10       SUBROUTINE CLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X,  SCALE,  CNORM,
11                          INFO )
12
13           CHARACTER      DIAG, NORMIN, TRANS, UPLO
14
15           INTEGER        INFO, N
16
17           REAL           SCALE
18
19           REAL           CNORM( * )
20
21           COMPLEX        AP( * ), X( * )
22

PURPOSE

24       CLATPS  solves  one  of  the triangular systems with scaling to prevent
25       overflow, where A is an upper or  lower  triangular  matrix  stored  in
26       packed  form.   Here  A**T denotes the transpose of A, A**H denotes the
27       conjugate transpose of A, x and b are n-element vectors,  and  s  is  a
28       scaling  factor,  usually  less  than or equal to 1, chosen so that the
29       components of x will be less  than  the  overflow  threshold.   If  the
30       unscaled  problem  will  not  cause  overflow, the Level 2 BLAS routine
31       CTPSV is called. If the matrix A is singular (A(j,j) = 0 for  some  j),
32       then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
33

ARGUMENTS

35       UPLO    (input) CHARACTER*1
36               Specifies whether the matrix A is upper or lower triangular.  =
37               'U':  Upper triangular
38               = 'L':  Lower triangular
39
40       TRANS   (input) CHARACTER*1
41               Specifies the operation applied to A.  = 'N':  Solve A  *  x  =
42               s*b     (No transpose)
43               = 'T':  Solve A**T * x = s*b  (Transpose)
44               = 'C':  Solve A**H * x = s*b  (Conjugate transpose)
45
46       DIAG    (input) CHARACTER*1
47               Specifies  whether  or  not the matrix A is unit triangular.  =
48               'N':  Non-unit triangular
49               = 'U':  Unit triangular
50
51       NORMIN  (input) CHARACTER*1
52               Specifies whether CNORM has been set or  not.   =  'Y':   CNORM
53               contains the column norms on entry
54               =  'N':  CNORM is not set on entry.  On exit, the norms will be
55               computed and stored in CNORM.
56
57       N       (input) INTEGER
58               The order of the matrix A.  N >= 0.
59
60       AP      (input) COMPLEX array, dimension (N*(N+1)/2)
61               The upper or lower triangular matrix A, packed columnwise in  a
62               linear  array.   The j-th column of A is stored in the array AP
63               as follows: if UPLO = 'U',  AP(i  +  (j-1)*j/2)  =  A(i,j)  for
64               1<=i<=j;  if  UPLO  =  'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for
65               j<=i<=n.
66
67       X       (input/output) COMPLEX array, dimension (N)
68               On entry, the right hand side b of the triangular  system.   On
69               exit, X is overwritten by the solution vector x.
70
71       SCALE   (output) REAL
72               The  scaling  factor  s  for the triangular system A * x = s*b,
73               A**T * x = s*b,  or  A**H * x = s*b.  If SCALE = 0, the  matrix
74               A  is singular or badly scaled, and the vector x is an exact or
75               approximate solution to A*x = 0.
76
77       CNORM   (input or output) REAL array, dimension (N)
78               If NORMIN = 'Y', CNORM is an input argument and  CNORM(j)  con‐
79               tains  the  norm of the off-diagonal part of the j-th column of
80               A.  If TRANS = 'N', CNORM(j) must be greater than or  equal  to
81               the  infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) must be
82               greater than or equal to the 1-norm.  If NORMIN = 'N', CNORM is
83               an  output argument and CNORM(j) returns the 1-norm of the off‐
84               diagonal part of the j-th column of A.
85
86       INFO    (output) INTEGER
87               = 0:  successful exit
88               < 0:  if INFO = -k, the k-th argument had an illegal value
89

FURTHER DETAILS

91       A rough bound on x is computed; if that is less than overflow, CTPSV is
92       called,  otherwise,  specific  code  is  used which checks for possible
93       overflow or divide-by-zero at every operation.
94       A columnwise scheme is used for solving A*x = b.  The  basic  algorithm
95       if A is lower triangular is
96            x[1:n] := b[1:n]
97            for j = 1, ..., n
98                 x(j) := x(j) / A(j,j)
99                 x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
100            end
101       Define bounds on the components of x after j iterations of the loop:
102          M(j) = bound on x[1:j]
103          G(j) = bound on x[j+1:n]
104       Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
105       Then for iteration j+1 we have
106          M(j+1) <= G(j) / | A(j+1,j+1) |
107          G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
108                 <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
109       where  CNORM(j+1) is greater than or equal to the infinity-norm of col‐
110       umn j+1 of A, not counting the diagonal.  Hence
111          G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
112                       1<=i<=j
113       and
114          |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
115                                        1<=i< j
116       Since |x(j)| <= M(j), we use the Level 2  BLAS  routine  CTPSV  if  the
117       reciprocal of the largest M(j), j=1,..,n, is larger than
118       max(underflow, 1/overflow).
119       The  bound on x(j) is also used to determine when a step in the column‐
120       wise method can be performed without fear of overflow.  If the computed
121       bound  is  greater  than a large constant, x is scaled to prevent over‐
122       flow, but if the bound overflows, x is set to 0, x(j) to 1,  and  scale
123       to  0,  and  a  non-trivial solution to A*x = 0 is found.  Similarly, a
124       row-wise scheme is used to solve A**T *x = b  or  A**H  *x  =  b.   The
125       basic algorithm for A upper triangular is
126            for j = 1, ..., n
127                 x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
128            end
129       We simultaneously compute two bounds
130            G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
131            M(j) = bound on x(i), 1<=i<=j
132       The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we add
133       the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.  Then  the
134       bound on x(j) is
135            M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
136                 <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
137                           1<=i<=j
138       and we can safely call CTPSV if 1/M(n) and 1/G(n) are both greater than
139       max(underflow, 1/overflow).
140
141
142
143 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008                       CLATPS(1)
Impressum