!----------------------------------------------------------------- ! ! Purpose ! ======= ! ! LA_STEVX computes selected eigenvalues and, optionally, eigenvectors ! of a real symmetric tridiagonal matrix A. Eigenvalues and ! eigenvectors can be selected by specifying either a range of values ! or a range of indices for the desired eigenvalues ! ! Arguments ! ========= ! ! SUBROUTINE LA_STEVX( D, E, W, Z, VL, VU, IL, IU, & ! M, IFAIL, ABSTOL, INFO ) ! REAL(), INTENT(INOUT) :: D(:), E(:) ! REAL(), INTENT(OUT) :: W(:) ! REAL(), INTENT(OUT), OPTIONAL :: Z(:,:) ! REAL(), INTENT(IN), OPTIONAL :: VL, VU ! INTEGER, INTENT(IN), OPTIONAL :: IL, IU ! INTEGER, INTENT(OUT), OPTIONAL :: M ! INTEGER, INTENT(OUT), OPTIONAL :: IFAIL(:) ! REAL(), INTENT(IN), OPTIONAL :: ABSTOL ! INTEGER, INTENT(OUT), OPTIONAL :: INFO ! where ! ::= KIND(1.0) | KIND(1.0D0) ! ! =================== ! ! D (input/output) REAL array, shape (:), where SIZE(D) ! indicates the matrix rank (n) ! On entry, the n diagonal elements of the tridiagonal matrix ! A. ! On exit, D may be multiplied by a constant factor chosen ! to avoid over/underflow in computing the eigenvalues. ! ! E (input/output) REAL array, shape (:), where ! SIZE(E) == SIZE(D). ! On entry, the (n-1) subdiagonal elements of the tridiagonal ! matrix A in elements 1 to n-1 of E; E(n) need not be set. ! On exit, E may be multiplied by a constant factor chosen ! to avoid over/underflow in computing the eigenvalues. ! ! W (output) REAL array, where SIZE(W) == n. ! The first M elements contain the selected eigenvalues in ! ascending order. ! ! Z Optional (output) REAL array, SIZE(Z,1) == SIZE(Z,2) == n. ! If INFO = 0, the first M columns of Z contain the orthonormal ! eigenvectors of the matrix A corresponding to the selected ! eigenvalues, with the i-th column of Z holding the eigenvector ! associated with W(i). If an eigenvector fails to converge ! (INFO > 0), then that column of Z contains the latest ! approximation to the eigenvector, and the index of the ! eigenvector is returned in IFAIL. ! ! VL Optional (input) REAL ! VU Optional (input) REAL ! The lower and upper bounds of the interval to be searched for ! eigenvalues. VL < VU. ! If VL is not present VL = -HUGE() is assumed. ! If VU is not present VU = HUGE() is assumed. ! ! IL Optional (input) INTEGER ! IU Optional (input) INTEGER ! The indices (in ascending order) of the smallest and largest ! eigenvalues to be returned. 1 <= IL <= IU <= N, if N > 0; ! If IL is not present IL = 1 is assumed. ! If IU is not present IU = n is assumed. ! ! M Optional (output) INTEGER ! The total number of eigenvalues found. 0 <= M <= N. ! ! IFAIL Optional (output) INTEGER array, dimension (N) ! If JOBZ = 'V', then if INFO = 0, the first M elements of ! IFAIL are zero. If INFO > 0, then IFAIL contains the ! indices of the eigenvectors that failed to converge. ! ! ABSTOL Optional (input) REAL ! The absolute error tolerance for the eigenvalues. ! An approximate eigenvalue is accepted as converged ! when it is determined to lie in an interval [a,b] ! of width less than or equal to ! ! ABSTOL + EPS * max( |a|,|b| ) , ! ! where EPS is the machine precision. If ABSTOL is less ! than or equal to zero, then EPS*|T| will be used in ! its place, where |T| is the 1-norm of the tridiagonal ! matrix. ! ! Eigenvalues will be computed most accurately when ABSTOL is ! set to twice the underflow threshold 2*_LAMCH('S'), not zero. ! If this routine returns with INFO>0, indicating that some ! eigenvectors did not converge, try setting ABSTOL to ! 2*_LAMCH('S'). ! If ABSTOL is not present then ABSTOL = 2*_LAMCH('S') is assumed. ! _LAMCH ::= SLAMCH | DLAMCH. ! ! See "Computing Small Singular Values of Bidiagonal Matrices ! with Guaranteed High Relative Accuracy," by Demmel and ! Kahan, LAPACK Working Note #3. ! ! INFO (output) INTEGER ! = 0: successful exit ! < 0: if INFO = -i, the i-th argument had an illegal value ! > 0: if INFO = i, then i eigenvectors failed to converge. ! Their indices are stored in array IFAIL. ! If INFO is not present and an error occurs, then the program is ! terminated with an error message. !------------------------------------- .