169 DOUBLE PRECISION FUNCTION dla_gbrcond( TRANS, N, KL, KU, AB, LDAB,
170 $ afb, ldafb, ipiv, cmode, c,
171 $ info, work, iwork )
180 INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
183 INTEGER IWORK( * ), IPIV( * )
184 DOUBLE PRECISION AB( ldab, * ), AFB( ldafb, * ), WORK( * ),
192 INTEGER KASE, I, J, KD, KE
193 DOUBLE PRECISION AINVNM, TMP
213 notrans = lsame( trans,
'N' )
214 IF ( .NOT. notrans .AND. .NOT. lsame(trans,
'T')
215 $ .AND. .NOT. lsame(trans,
'C') )
THEN
217 ELSE IF( n.LT.0 )
THEN
219 ELSE IF( kl.LT.0 .OR. kl.GT.n-1 )
THEN
221 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
223 ELSE IF( ldab.LT.kl+ku+1 )
THEN
225 ELSE IF( ldafb.LT.2*kl+ku+1 )
THEN
229 CALL xerbla(
'DLA_GBRCOND', -info )
245 IF ( cmode .EQ. 1 )
THEN
246 DO j = max( i-kl, 1 ), min( i+ku, n )
247 tmp = tmp + abs( ab( kd+i-j, j ) * c( j ) )
249 ELSE IF ( cmode .EQ. 0 )
THEN
250 DO j = max( i-kl, 1 ), min( i+ku, n )
251 tmp = tmp + abs( ab( kd+i-j, j ) )
254 DO j = max( i-kl, 1 ), min( i+ku, n )
255 tmp = tmp + abs( ab( kd+i-j, j ) / c( j ) )
263 IF ( cmode .EQ. 1 )
THEN
264 DO j = max( i-kl, 1 ), min( i+ku, n )
265 tmp = tmp + abs( ab( ke-i+j, i ) * c( j ) )
267 ELSE IF ( cmode .EQ. 0 )
THEN
268 DO j = max( i-kl, 1 ), min( i+ku, n )
269 tmp = tmp + abs( ab( ke-i+j, i ) )
272 DO j = max( i-kl, 1 ), min( i+ku, n )
273 tmp = tmp + abs( ab( ke-i+j, i ) / c( j ) )
286 CALL dlacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
293 work( i ) = work( i ) * work( 2*n+i )
297 CALL dgbtrs(
'No transpose', n, kl, ku, 1, afb, ldafb,
298 $ ipiv, work, n, info )
300 CALL dgbtrs(
'Transpose', n, kl, ku, 1, afb, ldafb, ipiv,
306 IF ( cmode .EQ. 1 )
THEN
308 work( i ) = work( i ) / c( i )
310 ELSE IF ( cmode .EQ. -1 )
THEN
312 work( i ) = work( i ) * c( i )
319 IF ( cmode .EQ. 1 )
THEN
321 work( i ) = work( i ) / c( i )
323 ELSE IF ( cmode .EQ. -1 )
THEN
325 work( i ) = work( i ) * c( i )
330 CALL dgbtrs(
'Transpose', n, kl, ku, 1, afb, ldafb, ipiv,
333 CALL dgbtrs(
'No transpose', n, kl, ku, 1, afb, ldafb,
334 $ ipiv, work, n, info )
340 work( i ) = work( i ) * work( 2*n+i )
348 IF( ainvnm .NE. 0.0d+0 )
subroutine xerbla(SRNAME, INFO)
XERBLA
double precision function dla_gbrcond(TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB, IPIV, CMODE, C, INFO, WORK, IWORK)
DLA_GBRCOND estimates the Skeel condition number for a general banded matrix.
subroutine dgbtrs(TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO)
DGBTRS
subroutine dlacn2(N, V, X, ISGN, EST, KASE, ISAVE)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...