289 SUBROUTINE dsbgvx( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
290 $ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
291 $ LDZ, WORK, IWORK, IFAIL, INFO )
298 CHARACTER JOBZ, RANGE, UPLO
299 INTEGER IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
301 DOUBLE PRECISION ABSTOL, VL, VU
304 INTEGER IFAIL( * ), IWORK( * )
305 DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
306 $ w( * ), work( * ), z( ldz, * )
312 DOUBLE PRECISION ZERO, ONE
313 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
316 LOGICAL ALLEIG, INDEIG, TEST, UPPER, VALEIG, WANTZ
317 CHARACTER ORDER, VECT
318 INTEGER I, IINFO, INDD, INDE, INDEE, INDISP,
319 $ indiwo, indwrk, itmp1, j, jj, nsplit
320 DOUBLE PRECISION TMP1
338 wantz = lsame( jobz,
'V' )
339 upper = lsame( uplo,
'U' )
340 alleig = lsame( range,
'A' )
341 valeig = lsame( range,
'V' )
342 indeig = lsame( range,
'I' )
345 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
347 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
349 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
351 ELSE IF( n.LT.0 )
THEN
353 ELSE IF( ka.LT.0 )
THEN
355 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
357 ELSE IF( ldab.LT.ka+1 )
THEN
359 ELSE IF( ldbb.LT.kb+1 )
THEN
361 ELSE IF( ldq.LT.1 .OR. ( wantz .AND. ldq.LT.n ) )
THEN
365 IF( n.GT.0 .AND. vu.LE.vl )
367 ELSE IF( indeig )
THEN
368 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
370 ELSE IF ( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
376 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
382 CALL xerbla(
'DSBGVX', -info )
394 CALL dpbstf( uplo, n, kb, bb, ldbb, info )
402 CALL dsbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq,
415 CALL dsbtrd( vect, uplo, n, ka, ab, ldab, work( indd ),
416 $ work( inde ), q, ldq, work( indwrk ), iinfo )
424 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
428 IF( ( alleig .OR. test ) .AND. ( abstol.LE.zero ) )
THEN
429 CALL dcopy( n, work( indd ), 1, w, 1 )
431 CALL dcopy( n-1, work( inde ), 1, work( indee ), 1 )
432 IF( .NOT.wantz )
THEN
433 CALL dsterf( n, w, work( indee ), info )
435 CALL dlacpy(
'A', n, n, q, ldq, z, ldz )
436 CALL dsteqr( jobz, n, w, work( indee ), z, ldz,
437 $ work( indwrk ), info )
461 CALL dstebz( range, order, n, vl, vu, il, iu, abstol,
462 $ work( indd ), work( inde ), m, nsplit, w,
463 $ iwork( 1 ), iwork( indisp ), work( indwrk ),
464 $ iwork( indiwo ), info )
467 CALL dstein( n, work( indd ), work( inde ), m, w,
468 $ iwork( 1 ), iwork( indisp ), z, ldz,
469 $ work( indwrk ), iwork( indiwo ), ifail, info )
475 CALL dcopy( n, z( 1, j ), 1, work( 1 ), 1 )
476 CALL dgemv(
'N', n, n, one, q, ldq, work, 1, zero,
491 IF( w( jj ).LT.tmp1 )
THEN
498 itmp1 = iwork( 1 + i-1 )
500 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
502 iwork( 1 + j-1 ) = itmp1
503 CALL dswap( n, z( 1, i ), 1, z( 1, j ), 1 )
506 ifail( i ) = ifail( j )
subroutine dsbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
DSBGVX