EVFHF

Computes the eigenvalues in a given range and the corresponding eigenvectors of a complex Hermitian matrix.

Required Arguments

MXEVAL — Maximum number of eigenvalues to be computed. (Input)

A — Complex Hermitian matrix of order N. (Input)

Only the upper triangle is used.

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.

Only the first NEVAL elements of EVAL are significant.

EVEC — Complex matrix containing in its first NEVAL columns the eigenvectors associated with the eigenvalues found stored in EVAL. Each vector is normalized to have Euclidean length equal to the value one. (Output)

Optional Arguments

N — Order of the matrix A. (Input)

Default: N = SIZE (A,2).

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).

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).

Default: LDEVEC = SIZE (EVEC,1).

FORTRAN 90 Interface

Generic: CALL EVFHF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL, EVEC [,…])

Specific: The specific interface names are S_EVFHF and D_EVFHF.

FORTRAN 77 Interface

Single: CALL EVFHF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL, EVEC, LDEVEC)

Double: The double precision name is DEVHFH.

Description

Routine EVFHF computes the eigenvalues in a given range and the corresponding eigenvectors 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. Inverse iteration is used to compute the eigenvectors of the tridiagonal matrix. The eigenvectors of the original matrix are computed by back transforming the eigenvectors of the tridiagonal matrix.

The reduction routine is based on the EISPACK routine HTRIDI. The bisection routine is based on the EISPACK routine BISECT. The inverse iteration routine is based on the EISPACK routine TINVIT. The back transformation routine is based on the EISPACK routine HTRIBK. See Smith et al. (1976) for the EISPACK routines.

Comments

1. Workspace may be explicitly provided, if desired, by use of E3FHF/DE3FHF. The reference is:

CALL E3FHF (N, MXEVAL, A, LDA, ELOW, EHIGH, NEVAL, EVAL, EVEC, LDEVEC, ACOPY, ECOPY, 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.

ECOPY — Work matrix of size N by MXEVAL. Used to store eigenvectors of a real tridiagonal matrix.

RWK — Work array of length 8N.

CWK — Complex work array of length 2N.

IWK — Work array of length MXEVAL.

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 | The iteration for an eigenvector failed to converge. The eigenvector will be set to 0. |

3 | 3 | 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. |

Example

In this example, a DATA statement is used to set A to a complex Hermitian matrix. The eigenvalues in the range [–15, 0] and their corresponding eigenvectors are computed and printed. As a test, this example uses MXEVAL = 3. The routine EVFHF computes the number of eigenvalues in the given range. That value, NEVAL, is two. As a check on the computations, the performance index is also computed and printed. For more details, see routine EPIHF.

USE IMSL_LIBRARIES

IMPLICIT NONE

! Declare variables

INTEGER LDA, LDEVEC, MXEVAL, N

PARAMETER (MXEVAL=3, N=3, LDA=N, LDEVEC=N)

!

INTEGER NEVAL, NOUT

REAL EHIGH, ELOW, EVAL(MXEVAL), PI

COMPLEX A(LDA,N), EVEC(LDEVEC,MXEVAL)

! Set values of A

!

! A = ((1, 0) ( 1,-7i) ( 0,- i))

! ((1,7i) ( 5, 0) (10,-3i))

! ((0, i) ( 10, 3i) (-2, 0))

!

DATA A/(1.0,0.0), (1.0,7.0), (0.0,1.0), (1.0,-7.0), (5.0,0.0), &

(10.0,3.0), (0.0,-1.0), (10.0,-3.0), (-2.0,0.0)/

!

! Find eigenvalues and vectors

ELOW = -15.0

EHIGH = 0.0

CALL EVFHF (MXEVAL, A, ELOW, EHIGH, NEVAL, EVAL, EVEC)

! Compute performance index

PI = EPIHF(NEVAL,A,EVAL,EVEC)

! Print results

CALL UMACH (2, NOUT)

WRITE (NOUT,'(/,A,I3)') ' NEVAL = ', NEVAL

CALL WRRRN ('EVAL', EVAL, 1, NEVAL, 1)

CALL WRCRN ('EVEC', EVEC, N, NEVAL, LDEVEC)

WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI

END

Output

NEVAL = 2

EVAL

1 2

-10.63 -0.75

EVEC

1 2

1 (-0.0598,-0.3117) ( 0.8539, 0.0000)

2 (-0.5939, 0.1841) (-0.0313,-0.1380)

3 ( 0.7160, 0.0000) ( 0.0808,-0.4942)

Performance index = 0.057