1
2      SUBROUTINE CG(NM,N,AR,AI,WR,WI,MATZ,ZR,ZI,FV1,FV2,FV3,IERR)
3C***BEGIN PROLOGUE  CG
4C***DATE WRITTEN   760101   (YYMMDD)
5C***REVISION DATE  830518   (YYMMDD)
6C***CATEGORY NO.  D4A4
7C***KEYWORDS  EIGENVALUES,EIGENVECTORS,EISPACK
8C***AUTHOR  SMITH, B. T., ET AL.
9C***PURPOSE  Computes the eigenvalues and, optionally, the eigenvectors
10C            of a complex general matrix.
11C***DESCRIPTION
12C
13C     This subroutine calls the recommended sequence of
14C     subroutines from the eigensystem subroutine package (EISPACK)
15C     to find the eigenvalues and eigenvectors (if desired)
16C     of a COMPLEX GENERAL matrix.
17C
18C     On INPUT
19C
20C        NM  must be set to the row dimension of the two-dimensional
21C        array parameters as declared in the calling program
22C        dimension statement.
23C
24C        N  is the order of the matrix  A=(AR,AI).
25C
26C        AR  and  AI  contain the real and imaginary parts,
27C        respectively, of the complex general matrix.
28C
29C        MATZ  is an integer variable set equal to zero if
30C        only eigenvalues are desired.  Otherwise it is set to
31C        any non-zero integer for both eigenvalues and eigenvectors.
32C
33C     On OUTPUT
34C
35C        WR  and  WI  contain the real and imaginary parts,
36C        respectively, of the eigenvalues.
37C
38C        ZR  and  ZI  contain the real and imaginary parts,
39C        respectively, of the eigenvectors if MATZ is not zero.
40C
41C        IERR  is an integer output variable set equal to an
42C        error completion code described in section 2B of the
43C        documentation.  The normal completion code is zero.
44C
45C        FV1, FV2, and  FV3  are temporary storage arrays.
46C
47C     Questions and comments should be directed to B. S. Garbow,
48C     APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY
49C     ------------------------------------------------------------------
50C***REFERENCES  B. T. SMITH, J. M. BOYLE, J. J. DONGARRA, B. S. GARBOW,
51C                 Y. IKEBE, V. C. KLEMA, C. B. MOLER, *MATRIX EIGEN-
52C                 SYSTEM ROUTINES - EISPACK GUIDE*, SPRINGER-VERLAG,
53C                 1976.
54C***ROUTINES CALLED  CBABK2,CBAL,COMQR,COMQR2,CORTH
55C***END PROLOGUE  CG
56
57
58