00001 SUBROUTINE CLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
00002 $ CNDNUM, DIST )
00003
00004
00005
00006
00007
00008
00009 CHARACTER DIST, TYPE
00010 CHARACTER*3 PATH
00011 INTEGER IMAT, KL, KU, M, MODE, N
00012 REAL ANORM, CNDNUM
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 REAL SHRINK, TENTH
00068 PARAMETER ( SHRINK = 0.25E0, TENTH = 0.1E+0 )
00069 REAL ONE
00070 PARAMETER ( ONE = 1.0E+0 )
00071 REAL TWO
00072 PARAMETER ( TWO = 2.0E+0 )
00073
00074
00075 LOGICAL FIRST
00076 CHARACTER*2 C2
00077 INTEGER MAT
00078 REAL BADC1, BADC2, EPS, LARGE, SMALL
00079
00080
00081 LOGICAL LSAMEN
00082 REAL SLAMCH
00083 EXTERNAL LSAMEN, SLAMCH
00084
00085
00086 INTRINSIC ABS, MAX, SQRT
00087
00088
00089 EXTERNAL SLABAD
00090
00091
00092 SAVE EPS, SMALL, LARGE, BADC1, BADC2, FIRST
00093
00094
00095 DATA FIRST / .TRUE. /
00096
00097
00098
00099
00100
00101 IF( FIRST ) THEN
00102 FIRST = .FALSE.
00103 EPS = SLAMCH( 'Precision' )
00104 BADC2 = TENTH / EPS
00105 BADC1 = SQRT( BADC2 )
00106 SMALL = SLAMCH( 'Safe minimum' )
00107 LARGE = ONE / SMALL
00108
00109
00110
00111
00112 CALL SLABAD( SMALL, LARGE )
00113 SMALL = SHRINK*( SMALL / EPS )
00114 LARGE = ONE / SMALL
00115 END IF
00116
00117 C2 = PATH( 2: 3 )
00118
00119
00120
00121 DIST = 'S'
00122 MODE = 3
00123
00124
00125
00126
00127 IF( LSAMEN( 2, C2, 'QR' ) .OR. LSAMEN( 2, C2, 'LQ' ) .OR.
00128 $ LSAMEN( 2, C2, 'QL' ) .OR. LSAMEN( 2, C2, 'RQ' ) ) THEN
00129
00130
00131
00132 TYPE = 'N'
00133
00134
00135
00136 IF( IMAT.EQ.1 ) THEN
00137 KL = 0
00138 KU = 0
00139 ELSE IF( IMAT.EQ.2 ) THEN
00140 KL = 0
00141 KU = MAX( N-1, 0 )
00142 ELSE IF( IMAT.EQ.3 ) THEN
00143 KL = MAX( M-1, 0 )
00144 KU = 0
00145 ELSE
00146 KL = MAX( M-1, 0 )
00147 KU = MAX( N-1, 0 )
00148 END IF
00149
00150
00151
00152 IF( IMAT.EQ.5 ) THEN
00153 CNDNUM = BADC1
00154 ELSE IF( IMAT.EQ.6 ) THEN
00155 CNDNUM = BADC2
00156 ELSE
00157 CNDNUM = TWO
00158 END IF
00159
00160 IF( IMAT.EQ.7 ) THEN
00161 ANORM = SMALL
00162 ELSE IF( IMAT.EQ.8 ) THEN
00163 ANORM = LARGE
00164 ELSE
00165 ANORM = ONE
00166 END IF
00167
00168 ELSE IF( LSAMEN( 2, C2, 'GE' ) ) THEN
00169
00170
00171
00172
00173
00174 TYPE = 'N'
00175
00176
00177
00178 IF( IMAT.EQ.1 ) THEN
00179 KL = 0
00180 KU = 0
00181 ELSE IF( IMAT.EQ.2 ) THEN
00182 KL = 0
00183 KU = MAX( N-1, 0 )
00184 ELSE IF( IMAT.EQ.3 ) THEN
00185 KL = MAX( M-1, 0 )
00186 KU = 0
00187 ELSE
00188 KL = MAX( M-1, 0 )
00189 KU = MAX( N-1, 0 )
00190 END IF
00191
00192
00193
00194 IF( IMAT.EQ.8 ) THEN
00195 CNDNUM = BADC1
00196 ELSE IF( IMAT.EQ.9 ) THEN
00197 CNDNUM = BADC2
00198 ELSE
00199 CNDNUM = TWO
00200 END IF
00201
00202 IF( IMAT.EQ.10 ) THEN
00203 ANORM = SMALL
00204 ELSE IF( IMAT.EQ.11 ) THEN
00205 ANORM = LARGE
00206 ELSE
00207 ANORM = ONE
00208 END IF
00209
00210 ELSE IF( LSAMEN( 2, C2, 'GB' ) ) THEN
00211
00212
00213
00214
00215
00216 TYPE = 'N'
00217
00218
00219
00220 IF( IMAT.EQ.5 ) THEN
00221 CNDNUM = BADC1
00222 ELSE IF( IMAT.EQ.6 ) THEN
00223 CNDNUM = TENTH*BADC2
00224 ELSE
00225 CNDNUM = TWO
00226 END IF
00227
00228 IF( IMAT.EQ.7 ) THEN
00229 ANORM = SMALL
00230 ELSE IF( IMAT.EQ.8 ) THEN
00231 ANORM = LARGE
00232 ELSE
00233 ANORM = ONE
00234 END IF
00235
00236 ELSE IF( LSAMEN( 2, C2, 'GT' ) ) THEN
00237
00238
00239
00240
00241
00242 TYPE = 'N'
00243
00244
00245
00246 IF( IMAT.EQ.1 ) THEN
00247 KL = 0
00248 ELSE
00249 KL = 1
00250 END IF
00251 KU = KL
00252
00253
00254
00255 IF( IMAT.EQ.3 ) THEN
00256 CNDNUM = BADC1
00257 ELSE IF( IMAT.EQ.4 ) THEN
00258 CNDNUM = BADC2
00259 ELSE
00260 CNDNUM = TWO
00261 END IF
00262
00263 IF( IMAT.EQ.5 .OR. IMAT.EQ.11 ) THEN
00264 ANORM = SMALL
00265 ELSE IF( IMAT.EQ.6 .OR. IMAT.EQ.12 ) THEN
00266 ANORM = LARGE
00267 ELSE
00268 ANORM = ONE
00269 END IF
00270
00271 ELSE IF( LSAMEN( 2, C2, 'PO' ) .OR. LSAMEN( 2, C2, 'PP' ) .OR.
00272 $ LSAMEN( 2, C2, 'HE' ) .OR. LSAMEN( 2, C2, 'HP' ) .OR.
00273 $ LSAMEN( 2, C2, 'SY' ) .OR. LSAMEN( 2, C2, 'SP' ) ) THEN
00274
00275
00276
00277
00278
00279
00280 TYPE = C2( 1: 1 )
00281
00282
00283
00284 IF( IMAT.EQ.1 ) THEN
00285 KL = 0
00286 ELSE
00287 KL = MAX( N-1, 0 )
00288 END IF
00289 KU = KL
00290
00291
00292
00293 IF( IMAT.EQ.6 ) THEN
00294 CNDNUM = BADC1
00295 ELSE IF( IMAT.EQ.7 ) THEN
00296 CNDNUM = BADC2
00297 ELSE
00298 CNDNUM = TWO
00299 END IF
00300
00301 IF( IMAT.EQ.8 ) THEN
00302 ANORM = SMALL
00303 ELSE IF( IMAT.EQ.9 ) THEN
00304 ANORM = LARGE
00305 ELSE
00306 ANORM = ONE
00307 END IF
00308
00309 ELSE IF( LSAMEN( 2, C2, 'PB' ) ) THEN
00310
00311
00312
00313
00314
00315 TYPE = 'P'
00316
00317
00318
00319 IF( IMAT.EQ.5 ) THEN
00320 CNDNUM = BADC1
00321 ELSE IF( IMAT.EQ.6 ) THEN
00322 CNDNUM = BADC2
00323 ELSE
00324 CNDNUM = TWO
00325 END IF
00326
00327 IF( IMAT.EQ.7 ) THEN
00328 ANORM = SMALL
00329 ELSE IF( IMAT.EQ.8 ) THEN
00330 ANORM = LARGE
00331 ELSE
00332 ANORM = ONE
00333 END IF
00334
00335 ELSE IF( LSAMEN( 2, C2, 'PT' ) ) THEN
00336
00337
00338
00339
00340 TYPE = 'P'
00341 IF( IMAT.EQ.1 ) THEN
00342 KL = 0
00343 ELSE
00344 KL = 1
00345 END IF
00346 KU = KL
00347
00348
00349
00350 IF( IMAT.EQ.3 ) THEN
00351 CNDNUM = BADC1
00352 ELSE IF( IMAT.EQ.4 ) THEN
00353 CNDNUM = BADC2
00354 ELSE
00355 CNDNUM = TWO
00356 END IF
00357
00358 IF( IMAT.EQ.5 .OR. IMAT.EQ.11 ) THEN
00359 ANORM = SMALL
00360 ELSE IF( IMAT.EQ.6 .OR. IMAT.EQ.12 ) THEN
00361 ANORM = LARGE
00362 ELSE
00363 ANORM = ONE
00364 END IF
00365
00366 ELSE IF( LSAMEN( 2, C2, 'TR' ) .OR. LSAMEN( 2, C2, 'TP' ) ) THEN
00367
00368
00369
00370
00371
00372 TYPE = 'N'
00373
00374
00375
00376 MAT = ABS( IMAT )
00377 IF( MAT.EQ.1 .OR. MAT.EQ.7 ) THEN
00378 KL = 0
00379 KU = 0
00380 ELSE IF( IMAT.LT.0 ) THEN
00381 KL = MAX( N-1, 0 )
00382 KU = 0
00383 ELSE
00384 KL = 0
00385 KU = MAX( N-1, 0 )
00386 END IF
00387
00388
00389
00390 IF( MAT.EQ.3 .OR. MAT.EQ.9 ) THEN
00391 CNDNUM = BADC1
00392 ELSE IF( MAT.EQ.4 .OR. MAT.EQ.10 ) THEN
00393 CNDNUM = BADC2
00394 ELSE
00395 CNDNUM = TWO
00396 END IF
00397
00398 IF( MAT.EQ.5 ) THEN
00399 ANORM = SMALL
00400 ELSE IF( MAT.EQ.6 ) THEN
00401 ANORM = LARGE
00402 ELSE
00403 ANORM = ONE
00404 END IF
00405
00406 ELSE IF( LSAMEN( 2, C2, 'TB' ) ) THEN
00407
00408
00409
00410
00411
00412 TYPE = 'N'
00413
00414
00415
00416 IF( IMAT.EQ.2 .OR. IMAT.EQ.8 ) THEN
00417 CNDNUM = BADC1
00418 ELSE IF( IMAT.EQ.3 .OR. IMAT.EQ.9 ) THEN
00419 CNDNUM = BADC2
00420 ELSE
00421 CNDNUM = TWO
00422 END IF
00423
00424 IF( IMAT.EQ.4 ) THEN
00425 ANORM = SMALL
00426 ELSE IF( IMAT.EQ.5 ) THEN
00427 ANORM = LARGE
00428 ELSE
00429 ANORM = ONE
00430 END IF
00431 END IF
00432 IF( N.LE.1 )
00433 $ CNDNUM = ONE
00434
00435 RETURN
00436
00437
00438
00439 END