EVBSF
Computes selected eigenvalues 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.
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 EVBSF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL [,…])
Specific: The specific interface names are S_EVBSF and D_EVBSF.
FORTRAN 77 Interface
Single: CALL EVBSF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL)
Double: The double precision name is DEVBSF.
Description
Routine EVBSF computes the eigenvalues in a given interval for 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 reduction step is based on the EISPACK routine TRED1. See Smith et al. (1976). The rational QR algorithm is called the PWK algorithm. It is given in Parlett (1980, page 169).
Comments
1. Workspace may be explicitly provided, if desired, by use of E5BSF/DE5BSF. The reference is
CALL E5BSF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL, WK, IWK)
The additional arguments are as follows:
WK — Work array of length 5N.
IWK — Integer work array of length 1N.
2. Informational error
Type |
Code |
Description |
3 |
1 |
The number of eigenvalues in the specified interval exceeds MXEVAL. NEVAL contains the number of eigenvalues in the interval. No eigenvalues will be returned. |
Example
In this example, a DATA statement is used to set A to a matrix given by Gregory and Karney (1969, page 56). The eigenvalues of A are known to be –1, 5, 5 and 15. The eigenvalues in the interval [1.5, 5.5] are computed and printed. As a test, this example uses MXEVAL = 4. The routine EVBSF computes NEVAL, the number of eigenvalues in the given interval. The value of NEVAL is 2.
USE EVBSF_INT
USE UMACH_INT
USE WRRRN_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, MXEVAL, N
PARAMETER (MXEVAL=4, N=4, LDA=N)
!
INTEGER NEVAL, NOUT
REAL A(LDA,N), EHIGH, ELOW, EVAL(MXEVAL)
!
! 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
ELOW = 1.5
EHIGH = 5.5
CALL EVBSF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL)
! Print results
CALL UMACH (2, NOUT)
WRITE (NOUT,'(/,A,I2)') ' NEVAL = ', NEVAL
CALL WRRRN ('EVAL', EVAL, 1, NEVAL, 1)
END
NEVAL = 2
EVAL
1 2
5.000 5.000