143 SUBROUTINE ctbcon( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
152 CHARACTER DIAG, NORM, UPLO
153 INTEGER INFO, KD, LDAB, N
158 COMPLEX AB( ldab, * ), WORK( * )
165 parameter ( one = 1.0e+0, zero = 0.0e+0 )
168 LOGICAL NOUNIT, ONENRM, UPPER
170 INTEGER IX, KASE, KASE1
171 REAL AINVNM, ANORM, SCALE, SMLNUM, XNORM
181 EXTERNAL lsame, icamax, clantb, slamch
187 INTRINSIC abs, aimag, max, real
193 cabs1( zdum ) = abs(
REAL( ZDUM ) ) + abs( AIMAG( zdum ) )
200 upper = lsame( uplo,
'U' )
201 onenrm = norm.EQ.
'1' .OR. lsame( norm,
'O' )
202 nounit = lsame( diag,
'N' )
204 IF( .NOT.onenrm .AND. .NOT.lsame( norm,
'I' ) )
THEN
206 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
208 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
210 ELSE IF( n.LT.0 )
THEN
212 ELSE IF( kd.LT.0 )
THEN
214 ELSE IF( ldab.LT.kd+1 )
THEN
218 CALL xerbla(
'CTBCON', -info )
230 smlnum = slamch(
'Safe minimum' )*
REAL( MAX( N, 1 ) )
234 anorm = clantb( norm, uplo, diag, n, kd, ab, ldab, rwork )
238 IF( anorm.GT.zero )
THEN
251 CALL clacn2( n, work( n+1 ), work, ainvnm, kase, isave )
253 IF( kase.EQ.kase1 )
THEN
257 CALL clatbs( uplo,
'No transpose', diag, normin, n, kd,
258 $ ab, ldab, work, scale, rwork, info )
263 CALL clatbs( uplo,
'Conjugate transpose', diag, normin,
264 $ n, kd, ab, ldab, work, scale, rwork, info )
270 IF( scale.NE.one )
THEN
271 ix = icamax( n, work, 1 )
272 xnorm = cabs1( work( ix ) )
273 IF( scale.LT.xnorm*smlnum .OR. scale.EQ.zero )
275 CALL csrscl( n, scale, work, 1 )
283 $ rcond = ( one / anorm ) / ainvnm
subroutine clatbs(UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X, SCALE, CNORM, INFO)
CLATBS solves a triangular banded system of equations.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctbcon(NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK, RWORK, INFO)
CTBCON
subroutine csrscl(N, SA, SX, INCX)
CSRSCL multiplies a vector by the reciprocal of a real scalar.
subroutine clacn2(N, V, X, EST, KASE, ISAVE)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...