264 SUBROUTINE chbevx( 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
278 INTEGER IFAIL( * ), IWORK( * )
279 REAL RWORK( * ), W( * )
280 COMPLEX AB( LDAB, * ), Q( LDQ, * ), WORK( * ),
288 PARAMETER ( ZERO = 0.0e0, one = 1.0e0 )
290 parameter( czero = ( 0.0e0, 0.0e0 ),
291 $ cone = ( 1.0e0, 0.0e0 ) )
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 REAL ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
300 $ SIGMA, SMLNUM, TMP1, VLL, VUU
306 EXTERNAL lsame, clanhb, slamch
314 INTRINSIC max, min, real, 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(
'CHBEVX', -info )
374 ctmp1 = ab( kd+1, 1 )
378 IF( .NOT.( vl.LT.tmp1 .AND. vu.GE.tmp1 ) )
382 w( 1 ) = real( ctmp1 )
391 safmin = slamch(
'Safe minimum' )
392 eps = slamch(
'Precision' )
393 smlnum = safmin / eps
394 bignum = one / smlnum
395 rmin = sqrt( smlnum )
396 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
409 anrm = clanhb(
'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 clascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
421 CALL clascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
424 $ abstll = abstol*sigma
437 CALL chbtrd( 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 scopy( n, rwork( indd ), 1, w, 1 )
453 IF( .NOT.wantz )
THEN
454 CALL scopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
455 CALL ssterf( n, w, rwork( indee ), info )
457 CALL clacpy(
'A', n, n, q, ldq, z, ldz )
458 CALL scopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
459 CALL csteqr( jobz, n, w, rwork( indee ), z, ldz,
460 $ rwork( indrwk ), info )
484 CALL sstebz( 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 cstein( n, rwork( indd ), rwork( inde ), m, w,
491 $ iwork( indibl ), iwork( indisp ), z, ldz,
492 $ rwork( indrwk ), iwork( indiwk ), ifail, info )
498 CALL ccopy( n, z( 1, j ), 1, work( 1 ), 1 )
499 CALL cgemv(
'N', n, n, cone, q, ldq, work, 1, czero,
507 IF( iscale.EQ.1 )
THEN
513 CALL sscal( 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 cswap( n, z( 1, i ), 1, z( 1, j ), 1 )
539 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine chbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
CHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine chbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
CHBTRD
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine clascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
CLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
SSTEBZ
subroutine cstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
CSTEIN
subroutine csteqr(compz, n, d, e, z, ldz, work, info)
CSTEQR
subroutine ssterf(n, d, e, info)
SSTERF
subroutine cswap(n, cx, incx, cy, incy)
CSWAP