Computes all of the eigenvalues of a complex matrix.
A — Complex matrix of order N. (Input)
EVAL — Complex vector of length N containing the eigenvalues of A in decreasing order of magnitude. (Output)
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 EVLCG (A, EVAL [,…])
Specific: The specific interface names are S_EVLCG and D_EVLCG.
Single: CALL EVLCG (N, A, LDA, EVAL)
Double: The double precision name is EVLCG.
Routine EVLCG computes the eigenvalues of a complex matrix. The matrix is first balanced. Unitary similarity transformations are used to reduce this balanced matrix to a complex upper Hessenberg matrix. The shifted QR algorithm is used to compute the eigenvalues of this Hessenberg 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.
1. Workspace may be explicitly provided, if desired, by use of E3LCG/DE3LCG. The reference is:
CALL E3LCG (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 the first N2 elements of 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 error
TypeCode
4 1 The iteration for an eigenvalue failed to converge.
3. Integer Options with Chapter 11 Options Manager
1
This option uses eight values to solve memory bank conflict (access
inefficiency) problems. In routine E3LCG, the internal or
working, leading dimension of ACOPY is 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 EVLCG
. Additional memory allocation and option value restoration are automatically
done in EVLCG.
There is no requirement that users change existing applications that use EVLCG or E3LCG. 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 EVLCG.
In this example, a DATA statement is used to set A to a matrix given by Gregory and Karney (1969, page 115). The program computes the eigenvalues of this matrix.
USE EVLCG_INT
USE WRCRN_INT
! Declare variables
INTEGER LDA, N
PARAMETER (N=3, LDA=N)
!
COMPLEX A(LDA,N), EVAL(N)
! Set values of A
!
! A = ( 1+2i 3+4i 21+22i)
! (43+44i 13+14i 15+16i)
! ( 5+6i 7+8i 25+26i)
!
DATA A/(1.0,2.0), (43.0,44.0), (5.0,6.0), (3.0,4.0), &
(13.0,14.0), (7.0,8.0), (21.0,22.0), (15.0,16.0), &
(25.0,26.0)/
!
! Find eigenvalues of A
CALL EVLCG (A, EVAL)
! Print results
CALL WRCRN ('EVAL', EVAL, 1, N, 1)
END
EVAL
1
2
3
( 39.78, 43.00) ( 6.70, -7.88) ( -7.48, 6.88)
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |