168 REAL FUNCTION sla_gbrcond( TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB,
169 $ ipiv, cmode, c, info, work, iwork )
178 INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
181 INTEGER IWORK( * ), IPIV( * )
182 REAL AB( ldab, * ), AFB( ldafb, * ), WORK( * ),
190 INTEGER KASE, I, J, KD, KE
211 notrans = lsame( trans,
'N' )
212 IF ( .NOT. notrans .AND. .NOT. lsame(trans,
'T')
213 $ .AND. .NOT. lsame(trans,
'C') )
THEN
215 ELSE IF( n.LT.0 )
THEN
217 ELSE IF( kl.LT.0 .OR. kl.GT.n-1 )
THEN
219 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
221 ELSE IF( ldab.LT.kl+ku+1 )
THEN
223 ELSE IF( ldafb.LT.2*kl+ku+1 )
THEN
227 CALL xerbla(
'SLA_GBRCOND', -info )
243 IF ( cmode .EQ. 1 )
THEN
244 DO j = max( i-kl, 1 ), min( i+ku, n )
245 tmp = tmp + abs( ab( kd+i-j, j ) * c( j ) )
247 ELSE IF ( cmode .EQ. 0 )
THEN
248 DO j = max( i-kl, 1 ), min( i+ku, n )
249 tmp = tmp + abs( ab( kd+i-j, j ) )
252 DO j = max( i-kl, 1 ), min( i+ku, n )
253 tmp = tmp + abs( ab( kd+i-j, j ) / c( j ) )
261 IF ( cmode .EQ. 1 )
THEN
262 DO j = max( i-kl, 1 ), min( i+ku, n )
263 tmp = tmp + abs( ab( ke-i+j, i ) * c( j ) )
265 ELSE IF ( cmode .EQ. 0 )
THEN
266 DO j = max( i-kl, 1 ), min( i+ku, n )
267 tmp = tmp + abs( ab( ke-i+j, i ) )
270 DO j = max( i-kl, 1 ), min( i+ku, n )
271 tmp = tmp + abs( ab( ke-i+j, i ) / c( j ) )
284 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
291 work( i ) = work( i ) * work( 2*n+i )
295 CALL sgbtrs(
'No transpose', n, kl, ku, 1, afb, ldafb,
296 $ ipiv, work, n, info )
298 CALL sgbtrs(
'Transpose', n, kl, ku, 1, afb, ldafb, ipiv,
304 IF ( cmode .EQ. 1 )
THEN
306 work( i ) = work( i ) / c( i )
308 ELSE IF ( cmode .EQ. -1 )
THEN
310 work( i ) = work( i ) * c( i )
317 IF ( cmode .EQ. 1 )
THEN
319 work( i ) = work( i ) / c( i )
321 ELSE IF ( cmode .EQ. -1 )
THEN
323 work( i ) = work( i ) * c( i )
328 CALL sgbtrs(
'Transpose', n, kl, ku, 1, afb, ldafb, ipiv,
331 CALL sgbtrs(
'No transpose', n, kl, ku, 1, afb, ldafb,
332 $ ipiv, work, n, info )
338 work( i ) = work( i ) * work( 2*n+i )
346 IF( ainvnm .NE. 0.0 )
subroutine xerbla(SRNAME, INFO)
XERBLA
real function sla_gbrcond(TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB, IPIV, CMODE, C, INFO, WORK, IWORK)
SLA_GBRCOND estimates the Skeel condition number for a general banded matrix.
subroutine slacn2(N, V, X, ISGN, EST, KASE, ISAVE)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine sgbtrs(TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO)
SGBTRS