225 SUBROUTINE dstevx( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
226 $ M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
233 CHARACTER JOBZ, RANGE
234 INTEGER IL, INFO, IU, LDZ, M, N
235 DOUBLE PRECISION ABSTOL, VL, VU
238 INTEGER IFAIL( * ), IWORK( * )
239 DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
245 DOUBLE PRECISION ZERO, ONE
246 parameter( zero = 0.0d0, one = 1.0d0 )
249 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
251 INTEGER I, IMAX, INDISP, INDIWO, INDWRK,
252 $ iscale, itmp1, j, jj, nsplit
253 DOUBLE PRECISION BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, SMLNUM,
254 $ tmp1, tnrm, vll, vuu
258 DOUBLE PRECISION DLAMCH, DLANST
259 EXTERNAL lsame, dlamch, dlanst
266 INTRINSIC max, min, sqrt
272 wantz = lsame( jobz,
'V' )
273 alleig = lsame( range,
'A' )
274 valeig = lsame( range,
'V' )
275 indeig = lsame( range,
'I' )
278 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
280 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
282 ELSE IF( n.LT.0 )
THEN
286 IF( n.GT.0 .AND. vu.LE.vl )
288 ELSE IF( indeig )
THEN
289 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
291 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
297 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
302 CALL xerbla(
'DSTEVX', -info )
313 IF( alleig .OR. indeig )
THEN
317 IF( vl.LT.d( 1 ) .AND. vu.GE.d( 1 ) )
THEN
329 safmin = dlamch(
'Safe minimum' )
330 eps = dlamch(
'Precision' )
331 smlnum = safmin / eps
332 bignum = one / smlnum
333 rmin = sqrt( smlnum )
334 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
346 tnrm = dlanst(
'M', n, d, e )
347 IF( tnrm.GT.zero .AND. tnrm.LT.rmin )
THEN
350 ELSE IF( tnrm.GT.rmax )
THEN
354 IF( iscale.EQ.1 )
THEN
355 CALL dscal( n, sigma, d, 1 )
356 CALL dscal( n-1, sigma, e( 1 ), 1 )
369 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
373 IF( ( alleig .OR. test ) .AND. ( abstol.LE.zero ) )
THEN
374 CALL dcopy( n, d, 1, w, 1 )
375 CALL dcopy( n-1, e( 1 ), 1, work( 1 ), 1 )
377 IF( .NOT.wantz )
THEN
378 CALL dsterf( n, w, work, info )
380 CALL dsteqr(
'I', n, w, work, z, ldz, work( indwrk ), info )
404 CALL dstebz( range, order, n, vll, vuu, il, iu, abstol, d, e, m,
405 $ nsplit, w, iwork( 1 ), iwork( indisp ),
406 $ work( indwrk ), iwork( indiwo ), info )
409 CALL dstein( n, d, e, m, w, iwork( 1 ), iwork( indisp ),
410 $ z, ldz, work( indwrk ), iwork( indiwo ), ifail,
417 IF( iscale.EQ.1 )
THEN
423 CALL dscal( imax, one / sigma, w, 1 )
434 IF( w( jj ).LT.tmp1 )
THEN
441 itmp1 = iwork( 1 + i-1 )
443 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
445 iwork( 1 + j-1 ) = itmp1
446 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
449 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
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 dstevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
DSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dswap(n, dx, incx, dy, incy)
DSWAP