Computes the eigenvalues in a given range of a complex Hermitian matrix.
MXEVAL — Maximum number of eigenvalues to be computed. (Input)
A — Complex
Hermitian matrix of order N. (Input)
Only the upper triangle is used.
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.
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).
Generic: CALL EVBHF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL [,…])
Specific: The specific interface names are S_EVBHF and D_EVBHF.
Single: CALL EVBHF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL)
Double: The double precision name is DEVBHF.
Routine EVBHF computes the eigenvalues in a given range of a complex Hermitian matrix. Unitary transformations are used to reduce the matrix to an equivalent symmetric tridiagonal matrix. A bisection algorithm is used to compute the eigenvalues in the given range of this tridiagonal matrix.
The reduction routine is based on the EISPACK routine HTRIDI. The bisection routine used is based on the EISPACK routine BISECT. See Smith et al. (1976) for the EISPACK routines.
1. Workspace may be explicitly provided, if desired, by use of E3BHF/DE3BHF. The reference is:
CALL E3BHF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL, ACOPY, RWK, CWK, IWK)
The additional arguments are as follows:
ACOPY — Complex work matrix of size N by N. A and ACOPY may be the same, in which case the first N2 elements of A will be destroyed.
RWK — Work array of length 5N.
CWK — Complex work array of length 2N.
IWK — Work array of length MXEVAL.
2. Informational errors
Type Code
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 The matrix is not Hermitian. It has a diagonal entry with a small imaginary part.
4 2 The matrix is not Hermitian. It has a diagonal entry with an imaginary part.
In this example, a DATA statement is used to set A to a matrix given by Gregory and Karney (1969, page 114). The eigenvalues in the range [1.5, 2.5] are computed and printed. This example allows a maximum number of eigenvalues MXEVAL = 2. The routine computes that there is one eigenvalue in the given range. This value is returned in NEVAL.
USE EVBHF_INT
USE UMACH_INT
USE WRRRN_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, MXEVAL, N
PARAMETER (MXEVAL=2, N=2, LDA=N)
!
INTEGER NEVAL, NOUT
REAL EHIGH, ELOW, EVAL(MXEVAL)
COMPLEX A(LDA,N)
! Set values of A
!
! A = ( 1 -i )
! ( i 1 )
!
DATA A/(1.0,0.0), (0.0,1.0), (0.0,-1.0), (1.0,0.0)/
!
! Find eigenvalue
ELOW = 1.5
EHIGH = 2.5
CALL EVBHF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL)
!
! Print results
CALL UMACH (2, NOUT)
WRITE (NOUT,'(/,A,I3)') ' NEVAL = ', NEVAL
CALL WRRRN ('EVAL', EVAL, 1, NEVAL, 1)
END
NEVAL = 1
EVAL
2.000
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |