EVLHF

Computes all of the eigenvalues of a complex Hermitian matrix.

Required Arguments

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

Only the upper triangle is used.

Only the upper triangle is used.

EVAL — Real vector of length N containing the eigenvalues of A in decreasing order

of magnitude. (Output)

of magnitude. (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).

FORTRAN 90 Interface

Generic: CALL EVLHF (A, EVAL [,…])

Specific: The specific interface names are S_EVLHF and D_EVLHF.

FORTRAN 77 Interface

Single: CALL EVLHF (N, A, LDA, EVAL)

Double: The double precision name is DEVLHF.

Description

Routine EVLHF computes the eigenvalues of a complex Hermitian matrix. Unitary similarity transformations are used to reduce the matrix to an equivalent real symmetric tridiagonal matrix. The implicit QL 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 E3LHF/DE3LHF. The reference is:

CALL E3LHF (N, A, LDA, EVAL, ACOPY, RWK, CWK, IWK)

The additional arguments are as follows:

ACOPY — Complex work array of length N2. A and ACOPY may be the same in which case A will be destroyed.

RWK — Work array of length N.

CWK — Complex work array of length 2N.

IWK — Integer work array of length N.

2. Informational errors

Type | Code | Description |
---|---|---|

3 | 1 | The matrix is not Hermitian. It has a diagonal entry with a small imaginary part. |

4 | 1 | The iteration for an eigenvalue failed to converge. |

4 | 2 | The matrix is not Hermitian. It has a diagonal entry with an imaginary part. |

3. Integer Options with Chapter 11 Options Manager

1 This option uses eight values to solve memory bank conflict (access inefficiency) problems. In routine E3LHF, the internal or working leading dimensions of ACOPY and ECOPY are both increased by IVAL(3) when N is a multiple of IVAL(4). The values IVAL(3) and IVAL(4) are temporarily replaced by IVAL(1) and IVAL(2), respectively, in routine EVLHF. Additional memory allocation and option value restoration are automatically done in EVLHF. There is no requirement that users change existing applications that use EVLHF or E3LHF. Default values for the option are IVAL(*) = 1, 16, 0, 1, 1, 16, 0, 1. Items 5 – 8 in IVAL(*) are for the generalized eigenvalue problem and are not used in EVLHF.

Example

In this example, a DATA statement is used to set A to a matrix given by Gregory and Karney (1969, page 114). The eigenvalues of this complex Hermitian matrix are computed and printed.

USE EVLHF_INT

USE WRRRN_INT

IMPLICIT NONE

! Declare variables

INTEGER LDA, N

PARAMETER (N=2, LDA=N)

!

REAL EVAL(N)

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 eigenvalues of A

CALL EVLHF (A, EVAL)

! Print results

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

END

Output

EVAL

1 2

2.000 0.000