EVLSF
Computes all of the eigenvalues of a real symmetric matrix.
Required Arguments
A — Real symmetric matrix of order N. (Input)
EVAL — Real vector of length N containing the eigenvalues of A in decreasing order of magnitude. (Output)
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).
FORTRAN 90 Interface
Generic: CALL EVLSF (A, EVAL [,])
Specific: The specific interface names are S_EVLSF and D_EVLSF.
FORTRAN 77 Interface
Single: CALL EVLSF (N, A, LDA, EVAL)
Double: The double precision name is DEVLSF.
Description
Routine EVLSF computes the eigenvalues 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.
The underlying code is based on either EISPACK or LAPACK code depending upon which supporting libraries are used during linking. For a detailed explanation, see “Using ScaLAPACK, LAPACK, LINPACK, and EISPACK” in the Introduction section of this manual.
Comments
1. Workspace may be explicitly provided, if desired, by use of E4LSF/DE4LSF. The reference is:
CALL E4LSF (N, A, LDA, EVAL, WORK, IWORK)
The additional arguments are as follows:
WORK — Work array of length 2N.
IWORK — Integer array of length N.
2. Informational error
Type
Code
Description
3
1
The iteration for the eigenvalue failed to converge in 100 iterations before deflating.
Example
In this example, the eigenvalues of a real symmetric matrix are computed and printed. This matrix is given by Gregory and Karney (1969, page 56).
 
USE EVLSF_INT
USE WRRRN_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, N
PARAMETER (N=4, LDA=N)
!
REAL A(LDA,N), EVAL(N)
! Set values of A
!
! A = ( 6.0 4.0 4.0 1.0)
! ( 4.0 6.0 1.0 4.0)
! ( 4.0 1.0 6.0 4.0)
! ( 1.0 4.0 4.0 6.0)
!
DATA A /6.0, 4.0, 4.0, 1.0, 4.0, 6.0, 1.0, 4.0, 4.0, 1.0, 6.0, &
4.0, 1.0, 4.0, 4.0, 6.0 /
!
! Find eigenvalues of A
CALL EVLSF (A, EVAL)
! Print results
CALL WRRRN ('EVAL', EVAL, 1, N, 1)
END
Output
 
EVAL
1 2 3 4
15.00 5.00 5.00 -1.00