GVCCG

Computes all of the eigenvalues and eigenvectors of a generalized complex eigensystem Az = λBz.

Required Arguments

A — Complex matrix of order N. (Input)

B — Complex matrix of order N. (Input)

ALPHA — Complex vector of length N. Ultimately, alpha(i)/betav(i) (for i = 1, …, n), will be the eigenvalues of the system in decreasing order of magnitude. (Output)

BETAV — Complex vector of length N. (Output)

EVEC — Complex matrix of order N. (Output)
The J-th eigenvector, corresponding to ALPHA(J)/BETAV(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.

Optional Arguments

N — Order of the matrices A and B. (Input)
Default: N = SIZE (A,2).

LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)
Default: LDA = SIZE (A,1).

LDB — Leading dimension of B exactly as specified in the dimension statement of the calling program. (Input)
Default: LDB = SIZE (B,1).

LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement of the calling program. (Input)
Default: LDEVEC = SIZE (EVEC,1).

FORTRAN 90 Interface

Generic: CALL GVCCG (A, B, ALPHA, BETAV, EVEC [,])

Specific: The specific interface names are S_GVCCG and D_GVCCG.

FORTRAN 77 Interface

Single: CALL GVCCG (N, A, LDA, B, LDB, ALPHA, BETAV, EVEC, LDEVEC)

Double: The double precision name is DGVCCG.

Description

Routine GVCCG computes the eigenvalues and eigenvectors of the generalized eigensystem Ax = λBx. Here, A and B, are complex matrices of order n. The eigenvalues for this problem can be infinite; so instead of returning λ, GVCCG returns α and β. If β is nonzero, then λ = α/β.

The routine GVCCG uses the QZ algorithm described by Moler and Stewart (1973). The implementation is based on routines of Garbow (1978). Some timing results are given in Hanson et al. (1990).

Comments

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

CALL G6CCG (N, A, LDA, B, LDB, ALPHA, BETAV, EVEC, LDEVEC, ACOPY, BCOPY, CWK, WK, 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.

BCOPY — Complex work array of length N2. B and BCOPY may be the same in which case the first N2 elements of B will be destroyed.

CWK — Complex work array of length N.

WK — Real work array of length N.

IWK — Integer work array of length N.

2. Informational error

 

Type

Code

Description

4

1

The iteration for an eigenvalue failed to converge.

3. The success of this routine can be checked using GPICG.

Example

In this example, DATA statements are used to set A and B. The eigenvalues and eigenvectors are computed and printed. The performance index is also computed and printed. This serves as a check on the computations. For more details, see routine GPICG.

 

USE IMSL_LIBRARIES

 

IMPLICIT NONE

INTEGER LDA, LDB, LDEVEC, N

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

!

INTEGER I, NOUT

REAL PI

COMPLEX A(LDA,N), ALPHA(N), B(LDB,N), BETAV(N), EVAL(N), &

EVEC(LDEVEC,N)

!

! Define values of A and B

! A = ( 1+0i 0.5+i 0+5i )

! (-10+0i 2+i 0+0i )

! ( 5+i 1+0i 0.5+3i )

!

! B = ( 0.5+0i 0+0i 0+0i )

! ( 3+3i 3+3i 0+i )

! ( 4+2i 0.5+i 1+i )

!

! Declare variables

DATA A/(1.0,0.0), (-10.0,0.0), (5.0,1.0), (0.5,1.0), (2.0,1.0), &

(1.0,0.0), (0.0,5.0), (0.0,0.0), (0.5,3.0)/

DATA B/(0.5,0.0), (3.0,3.0), (4.0,2.0), (0.0,0.0), (3.0,3.0), &

(0.5,1.0), (0.0,0.0), (0.0,1.0), (1.0,1.0)/

! Compute eigenvalues

CALL GVCCG (A, B, ALPHA, BETAV, EVEC)

 

EVAL = ALPHA/BETAV

! Compute performance index

PI = GPICG(N,A,B,ALPHA,BETAV,EVEC)

! Print results

CALL UMACH (2, NOUT)

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

CALL WRCRN ('EVEC', EVEC)

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

END

Output

 

EVAL

1 2 3

( -8.18,-25.38) ( 2.18, 0.61) ( 0.12, -0.39)

 

EVEC

1 2 3

1 (-0.3267,-0.1245) (-0.3007,-0.2444) ( 0.0371, 0.1518)

2 ( 0.1767, 0.0054) ( 0.8959, 0.0000) ( 0.9577, 0.0000)

3 ( 0.9201, 0.0000) (-0.2019, 0.0801) (-0.2215, 0.0968)

 

Performance index = 0.709