262 SUBROUTINE dsbevx( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
263 $ VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
271 CHARACTER JOBZ, RANGE, UPLO
272 INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
273 DOUBLE PRECISION ABSTOL, VL, VU
276 INTEGER IFAIL( * ), IWORK( * )
277 DOUBLE PRECISION AB( LDAB, * ), Q( LDQ, * ), W( * ), WORK( * ),
284 DOUBLE PRECISION ZERO, ONE
285 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
288 LOGICAL ALLEIG, INDEIG, LOWER, TEST, VALEIG, WANTZ
290 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE, INDIBL,
291 $ indisp, indiwo, indwrk, iscale, itmp1, j, jj,
293 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
294 $ SIGMA, SMLNUM, TMP1, VLL, VUU
298 DOUBLE PRECISION DLAMCH, DLANSB
299 EXTERNAL lsame, dlamch, dlansb
306 INTRINSIC max, min, sqrt
312 wantz = lsame( jobz,
'V' )
313 alleig = lsame( range,
'A' )
314 valeig = lsame( range,
'V' )
315 indeig = lsame( range,
'I' )
316 lower = lsame( uplo,
'L' )
319 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
321 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
323 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
325 ELSE IF( n.LT.0 )
THEN
327 ELSE IF( kd.LT.0 )
THEN
329 ELSE IF( ldab.LT.kd+1 )
THEN
331 ELSE IF( wantz .AND. ldq.LT.max( 1, n ) )
THEN
335 IF( n.GT.0 .AND. vu.LE.vl )
337 ELSE IF( indeig )
THEN
338 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
340 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
346 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
351 CALL xerbla(
'DSBEVX', -info )
369 IF( .NOT.( vl.LT.tmp1 .AND. vu.GE.tmp1 ) )
382 safmin = dlamch(
'Safe minimum' )
383 eps = dlamch(
'Precision' )
384 smlnum = safmin / eps
385 bignum = one / smlnum
386 rmin = sqrt( smlnum )
387 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
400 anrm = dlansb(
'M', uplo, n, kd, ab, ldab, work )
401 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
404 ELSE IF( anrm.GT.rmax )
THEN
408 IF( iscale.EQ.1 )
THEN
410 CALL dlascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
412 CALL dlascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
415 $ abstll = abstol*sigma
427 CALL dsbtrd( jobz, uplo, n, kd, ab, ldab, work( indd ),
428 $ work( inde ), q, ldq, work( indwrk ), iinfo )
436 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
440 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
441 CALL dcopy( n, work( indd ), 1, w, 1 )
443 IF( .NOT.wantz )
THEN
444 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
445 CALL dsterf( n, w, work( indee ), info )
447 CALL dlacpy(
'A', n, n, q, ldq, z, ldz )
448 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
449 CALL dsteqr( jobz, n, w, work( indee ), z, ldz,
450 $ work( indwrk ), info )
474 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
475 $ work( indd ), work( inde ), m, nsplit, w,
476 $ iwork( indibl ), iwork( indisp ), work( indwrk ),
477 $ iwork( indiwo ), info )
480 CALL dstein( n, work( indd ), work( inde ), m, w,
481 $ iwork( indibl ), iwork( indisp ), z, ldz,
482 $ work( indwrk ), iwork( indiwo ), ifail, info )
488 CALL dcopy( n, z( 1, j ), 1, work( 1 ), 1 )
489 CALL dgemv(
'N', n, n, one, q, ldq, work, 1, zero,
497 IF( iscale.EQ.1 )
THEN
503 CALL dscal( imax, one / sigma, w, 1 )
514 IF( w( jj ).LT.tmp1 )
THEN
521 itmp1 = iwork( indibl+i-1 )
523 iwork( indibl+i-1 ) = iwork( indibl+j-1 )
525 iwork( indibl+j-1 ) = itmp1
526 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
529 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dsbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
DSBTRD
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
DSTEBZ
subroutine dstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
DSTEIN
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dswap(n, dx, incx, dy, incy)
DSWAP