EVFSF
Computes selected eigenvalues and eigenvectors of a real symmetric matrix.
Required Arguments
MXEVAL — Maximum number of eigenvalues to be computed. (Input)
A — Real symmetric matrix of order N. (Input)
ELOW — Lower limit of the interval in which the eigenvalues are sought. (Input)
EHIGH — Upper limit of the interval in which the eigenvalues are sought. (Input)
NEVAL — Number of eigenvalues found. (Output)
EVAL — Real vector of length MXEVAL containing the eigenvalues of A in the interval
(ELOW, EHIGH) in decreasing order of magnitude. (Output)
Only the first NEVAL elements of EVAL are significant.
EVEC — Real matrix of dimension N by MXEVAL. (Output)
The J-th eigenvector corresponding to EVAL(J), is stored in the J-th column. Only the first NEVAL columns of EVEC are significant. Each vector is normalized to have Euclidean length equal to the value one.
Optional Arguments
N — Order of the matrix A. (Input)
Default: N = SIZE (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)
Default: LDA = SIZE (A,1).
LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement in the calling program. (Input)
Default: LDEVEC = SIZE (EVEC,1).
FORTRAN 90 Interface
Generic: CALL EVFSF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL, EVEC [,])
Specific: The specific interface names are S_EVFSF and D_EVFSF.
FORTRAN 77 Interface
Single: CALL EVFSF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL, EVEC, LDEVEC)
Double: The double precision name is DEVFSF.
Description
Routine EVFSF computes the eigenvalues in a given interval and the corresponding eigenvectors of a real symmetric matrix. Orthogonal similarity transformations are used to reduce the matrix to an equivalent symmetric tridiagonal matrix. Then, an implicit rational QR algorithm is used to compute the eigenvalues of this tridiagonal matrix. Inverse iteration is used to compute the eigenvectors of the tridiagonal matrix. This is followed by orthogonalization of these vectors. The eigenvectors of the original matrix are computed by back transforming those of the tridiagonal matrix.
The reduction step is based on the EISPACK routine TRED1. The rational QR algorithm is called the PWK algorithm. It is given in Parlett (1980, page 169). The inverse iteration and orthogonalization processes are discussed in Hanson et al. (1990). The transformation back to the users’s input matrix is based on the EISPACK routine TRBAK1. See Smith et al. (1976) for the EISPACK routines.
Comments
1. Workspace may be explicitly provided, if desired, by use of E3FSF/DE3FSF. The reference is:
CALL E3FSF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, VAL, EVEC, LDEVEC, WK, IWK)
The additional arguments are as follows:
WK — Work array of length 9N.
IWK — Integer work array of length N.
2. Informational errors
Type
Code
Description
3
1
The number of eigenvalues in the specified range exceeds MXEVAL. NEVAL contains the number of eigenvalues in the range. No eigenvalues will be computed.
3
2
Inverse iteration did not converge. Eigenvector is not correct for the specified eigenvalue.
3
3
The eigenvectors have lost orthogonality.
Example
In this example, A is set to the computed Hilbert matrix. The eigenvalues in the interval [0.001, 1] and their corresponding eigenvectors are computed and printed. This example uses MXEVAL = 3. The routine EVFSF computes the number of eigenvalues NEVAL in the given interval. The value of NEVAL is 2. The performance index is also computed and printed. For more details, see IMSL routine EPISF.
 
USE EVFSF_INT
USE EPISF_INT
USE WRRRN_INT
USE UMACH_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDEVEC, MXEVAL, N, J, I
PARAMETER (MXEVAL=3, N=3, LDA=N, LDEVEC=N)
!
INTEGER NEVAL, NOUT
REAL A(LDA,N), EHIGH, ELOW, EVAL(MXEVAL), &
EVEC(LDEVEC,MXEVAL), PI
! Compute Hilbert matrix
DO 20 J=1,N
DO 10 I=1,N
A(I,J) = 1.0/FLOAT(I+J-1)
10 CONTINUE
20 CONTINUE
! Find eigenvalues and vectors
ELOW = 0.001
EHIGH = 1.0
CALL EVFSF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL, EVEC, LDEVEC)
! Compute performance index
PI = EPISF(NEVAL,A,EVAL,EVEC)
! Print results
CALL UMACH (2, NOUT)
WRITE (NOUT,'(/,A,I2)') ' NEVAL = ', NEVAL
CALL WRRRN ('EVAL', EVAL, 1, NEVAl, 1)
CALL WRRRN ('EVEC', EVEC, N, NEVAL, LDEVEC)
WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI
END
Output
 
NEVAL = 2
EVAL
1 2
0.1223 0.0027
EVEC
1 2
1 -0.5474 -0.1277
2 0.5283 0.7137
3 0.6490 -0.6887
 
Performance index = 0.008