303 SUBROUTINE dstevr( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
304 $ m, w, z, ldz, isuppz, work, lwork, iwork,
313 CHARACTER JOBZ, RANGE
314 INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
315 DOUBLE PRECISION ABSTOL, VL, VU
318 INTEGER ISUPPZ( * ), IWORK( * )
319 DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( ldz, * )
325 DOUBLE PRECISION ZERO, ONE, TWO
326 parameter ( zero = 0.0d+0, one = 1.0d+0, two = 2.0d+0 )
329 LOGICAL ALLEIG, INDEIG, TEST, LQUERY, VALEIG, WANTZ,
332 INTEGER I, IEEEOK, IMAX, INDIBL, INDIFL, INDISP,
333 $ indiwo, iscale, itmp1, j, jj, liwmin, lwmin,
335 DOUBLE PRECISION BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, SMLNUM,
336 $ tmp1, tnrm, vll, vuu
341 DOUBLE PRECISION DLAMCH, DLANST
342 EXTERNAL lsame, ilaenv, dlamch, dlanst
349 INTRINSIC max, min, sqrt
356 ieeeok = ilaenv( 10,
'DSTEVR',
'N', 1, 2, 3, 4 )
358 wantz = lsame( jobz,
'V' )
359 alleig = lsame( range,
'A' )
360 valeig = lsame( range,
'V' )
361 indeig = lsame( range,
'I' )
363 lquery = ( ( lwork.EQ.-1 ) .OR. ( liwork.EQ.-1 ) )
364 lwmin = max( 1, 20*n )
365 liwmin = max( 1, 10*n )
369 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
371 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
373 ELSE IF( n.LT.0 )
THEN
377 IF( n.GT.0 .AND. vu.LE.vl )
379 ELSE IF( indeig )
THEN
380 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
382 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
388 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
397 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
399 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
405 CALL xerbla(
'DSTEVR', -info )
407 ELSE IF( lquery )
THEN
418 IF( alleig .OR. indeig )
THEN
422 IF( vl.LT.d( 1 ) .AND. vu.GE.d( 1 ) )
THEN
434 safmin = dlamch(
'Safe minimum' )
435 eps = dlamch(
'Precision' )
436 smlnum = safmin / eps
437 bignum = one / smlnum
438 rmin = sqrt( smlnum )
439 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
450 tnrm = dlanst(
'M', n, d, e )
451 IF( tnrm.GT.zero .AND. tnrm.LT.rmin )
THEN
454 ELSE IF( tnrm.GT.rmax )
THEN
458 IF( iscale.EQ.1 )
THEN
459 CALL dscal( n, sigma, d, 1 )
460 CALL dscal( n-1, sigma, e( 1 ), 1 )
491 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
495 IF( ( alleig .OR. test ) .AND. ieeeok.EQ.1 )
THEN
496 CALL dcopy( n-1, e( 1 ), 1, work( 1 ), 1 )
497 IF( .NOT.wantz )
THEN
498 CALL dcopy( n, d, 1, w, 1 )
499 CALL dsterf( n, w, work, info )
501 CALL dcopy( n, d, 1, work( n+1 ), 1 )
502 IF (abstol .LE. two*n*eps)
THEN
507 CALL dstemr( jobz,
'A', n, work( n+1 ), work, vl, vu, il,
508 $ iu, m, w, z, ldz, n, isuppz, tryrac,
509 $ work( 2*n+1 ), lwork-2*n, iwork, liwork, info )
527 CALL dstebz( range, order, n, vll, vuu, il, iu, abstol, d, e, m,
528 $ nsplit, w, iwork( indibl ), iwork( indisp ), work,
529 $ iwork( indiwo ), info )
532 CALL dstein( n, d, e, m, w, iwork( indibl ), iwork( indisp ),
533 $ z, ldz, work, iwork( indiwo ), iwork( indifl ),
540 IF( iscale.EQ.1 )
THEN
546 CALL dscal( imax, one / sigma, w, 1 )
557 IF( w( jj ).LT.tmp1 )
THEN
566 iwork( i ) = iwork( j )
569 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
subroutine dsterf(N, D, E, INFO)
DSTERF
subroutine dstevr(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matric...
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 xerbla(SRNAME, INFO)
XERBLA
subroutine dswap(N, DX, INCX, DY, INCY)
DSWAP
subroutine dscal(N, DA, DX, INCX)
DSCAL
subroutine dstemr(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEMR
subroutine dstein(N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSTEIN