264 SUBROUTINE zhbevx( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
265 $ VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
266 $ IWORK, IFAIL, INFO )
273 CHARACTER JOBZ, RANGE, UPLO
274 INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
275 DOUBLE PRECISION ABSTOL, VL, VU
278 INTEGER IFAIL( * ), IWORK( * )
279 DOUBLE PRECISION RWORK( * ), W( * )
280 COMPLEX*16 AB( LDAB, * ), Q( LDQ, * ), WORK( * ),
287 DOUBLE PRECISION ZERO, ONE
288 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
289 COMPLEX*16 CZERO, CONE
290 parameter( czero = ( 0.0d0, 0.0d0 ),
291 $ cone = ( 1.0d0, 0.0d0 ) )
294 LOGICAL ALLEIG, INDEIG, LOWER, TEST, VALEIG, WANTZ
296 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE, INDIBL,
297 $ indisp, indiwk, indrwk, indwrk, iscale, itmp1,
299 DOUBLE PRECISION ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
300 $ SIGMA, SMLNUM, TMP1, VLL, VUU
305 DOUBLE PRECISION DLAMCH, ZLANHB
306 EXTERNAL lsame, dlamch, zlanhb
314 INTRINSIC dble, max, min, sqrt
320 wantz = lsame( jobz,
'V' )
321 alleig = lsame( range,
'A' )
322 valeig = lsame( range,
'V' )
323 indeig = lsame( range,
'I' )
324 lower = lsame( uplo,
'L' )
327 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
329 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
331 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
333 ELSE IF( n.LT.0 )
THEN
335 ELSE IF( kd.LT.0 )
THEN
337 ELSE IF( ldab.LT.kd+1 )
THEN
339 ELSE IF( wantz .AND. ldq.LT.max( 1, n ) )
THEN
343 IF( n.GT.0 .AND. vu.LE.vl )
345 ELSE IF( indeig )
THEN
346 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
348 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
354 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
359 CALL xerbla(
'ZHBEVX', -info )
374 ctmp1 = ab( kd+1, 1 )
378 IF( .NOT.( vl.LT.tmp1 .AND. vu.GE.tmp1 ) )
382 w( 1 ) = dble( ctmp1 )
391 safmin = dlamch(
'Safe minimum' )
392 eps = dlamch(
'Precision' )
393 smlnum = safmin / eps
394 bignum = one / smlnum
395 rmin = sqrt( smlnum )
396 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
409 anrm = zlanhb(
'M', uplo, n, kd, ab, ldab, rwork )
410 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
413 ELSE IF( anrm.GT.rmax )
THEN
417 IF( iscale.EQ.1 )
THEN
419 CALL zlascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
421 CALL zlascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
424 $ abstll = abstol*sigma
437 CALL zhbtrd( jobz, uplo, n, kd, ab, ldab, rwork( indd ),
438 $ rwork( inde ), q, ldq, work( indwrk ), iinfo )
446 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
450 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
451 CALL dcopy( n, rwork( indd ), 1, w, 1 )
453 IF( .NOT.wantz )
THEN
454 CALL dcopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
455 CALL dsterf( n, w, rwork( indee ), info )
457 CALL zlacpy(
'A', n, n, q, ldq, z, ldz )
458 CALL dcopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
459 CALL zsteqr( jobz, n, w, rwork( indee ), z, ldz,
460 $ rwork( indrwk ), info )
484 CALL dstebz( range, order, n, vll, vuu, il, iu, abstll,
485 $ rwork( indd ), rwork( inde ), m, nsplit, w,
486 $ iwork( indibl ), iwork( indisp ), rwork( indrwk ),
487 $ iwork( indiwk ), info )
490 CALL zstein( n, rwork( indd ), rwork( inde ), m, w,
491 $ iwork( indibl ), iwork( indisp ), z, ldz,
492 $ rwork( indrwk ), iwork( indiwk ), ifail, info )
498 CALL zcopy( n, z( 1, j ), 1, work( 1 ), 1 )
499 CALL zgemv(
'N', n, n, cone, q, ldq, work, 1, czero,
507 IF( iscale.EQ.1 )
THEN
513 CALL dscal( imax, one / sigma, w, 1 )
524 IF( w( jj ).LT.tmp1 )
THEN
531 itmp1 = iwork( indibl+i-1 )
533 iwork( indibl+i-1 ) = iwork( indibl+j-1 )
535 iwork( indibl+j-1 ) = itmp1
536 CALL zswap( n, z( 1, i ), 1, z( 1, j ), 1 )
539 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zhbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
ZHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine zhbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
ZHBTRD
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
ZLASCL 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 zstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
ZSTEIN
subroutine zsteqr(compz, n, d, e, z, ldz, work, info)
ZSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP