233 SUBROUTINE dspevx( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
234 $ abstol, m, w, z, ldz, work, iwork, ifail,
243 CHARACTER JOBZ, RANGE, UPLO
244 INTEGER IL, INFO, IU, LDZ, M, N
245 DOUBLE PRECISION ABSTOL, VL, VU
248 INTEGER IFAIL( * ), IWORK( * )
249 DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( ldz, * )
255 DOUBLE PRECISION ZERO, ONE
256 parameter ( zero = 0.0d0, one = 1.0d0 )
259 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
261 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE, INDIBL,
262 $ indisp, indiwo, indtau, indwrk, iscale, itmp1,
264 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
265 $ sigma, smlnum, tmp1, vll, vuu
269 DOUBLE PRECISION DLAMCH, DLANSP
270 EXTERNAL lsame, dlamch, dlansp
277 INTRINSIC max, min, sqrt
283 wantz = lsame( jobz,
'V' )
284 alleig = lsame( range,
'A' )
285 valeig = lsame( range,
'V' )
286 indeig = lsame( range,
'I' )
289 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
291 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
293 ELSE IF( .NOT.( lsame( uplo,
'L' ) .OR. lsame( uplo,
'U' ) ) )
296 ELSE IF( n.LT.0 )
THEN
300 IF( n.GT.0 .AND. vu.LE.vl )
302 ELSE IF( indeig )
THEN
303 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
305 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
311 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
316 CALL xerbla(
'DSPEVX', -info )
327 IF( alleig .OR. indeig )
THEN
331 IF( vl.LT.ap( 1 ) .AND. vu.GE.ap( 1 ) )
THEN
343 safmin = dlamch(
'Safe minimum' )
344 eps = dlamch(
'Precision' )
345 smlnum = safmin / eps
346 bignum = one / smlnum
347 rmin = sqrt( smlnum )
348 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
361 anrm = dlansp(
'M', uplo, n, ap, work )
362 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
365 ELSE IF( anrm.GT.rmax )
THEN
369 IF( iscale.EQ.1 )
THEN
370 CALL dscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
372 $ abstll = abstol*sigma
385 CALL dsptrd( uplo, n, ap, work( indd ), work( inde ),
386 $ work( indtau ), iinfo )
394 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
398 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
399 CALL dcopy( n, work( indd ), 1, w, 1 )
401 IF( .NOT.wantz )
THEN
402 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
403 CALL dsterf( n, w, work( indee ), info )
405 CALL dopgtr( uplo, n, ap, work( indtau ), z, ldz,
406 $ work( indwrk ), iinfo )
407 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
408 CALL dsteqr( jobz, n, w, work( indee ), z, ldz,
409 $ work( indwrk ), info )
433 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
434 $ work( indd ), work( inde ), m, nsplit, w,
435 $ iwork( indibl ), iwork( indisp ), work( indwrk ),
436 $ iwork( indiwo ), info )
439 CALL dstein( n, work( indd ), work( inde ), m, w,
440 $ iwork( indibl ), iwork( indisp ), z, ldz,
441 $ work( indwrk ), iwork( indiwo ), ifail, info )
446 CALL dopmtr(
'L', uplo,
'N', n, m, ap, work( indtau ), z, ldz,
447 $ work( indwrk ), iinfo )
453 IF( iscale.EQ.1 )
THEN
459 CALL dscal( imax, one / sigma, w, 1 )
470 IF( w( jj ).LT.tmp1 )
THEN
477 itmp1 = iwork( indibl+i-1 )
479 iwork( indibl+i-1 ) = iwork( indibl+j-1 )
481 iwork( indibl+j-1 ) = itmp1
482 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
485 ifail( i ) = ifail( j )
subroutine dsterf(N, D, E, INFO)
DSTERF
subroutine dstebz(RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E, M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK, INFO)
DSTEBZ
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine dopmtr(SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK, INFO)
DOPMTR
subroutine dsteqr(COMPZ, N, D, E, Z, LDZ, WORK, INFO)
DSTEQR
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dswap(N, DX, INCX, DY, INCY)
DSWAP
subroutine dspevx(JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matric...
subroutine dscal(N, DA, DX, INCX)
DSCAL
subroutine dsptrd(UPLO, N, AP, D, E, TAU, INFO)
DSPTRD
subroutine dopgtr(UPLO, N, AP, TAU, Q, LDQ, WORK, INFO)
DOPGTR
subroutine dstein(N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSTEIN