Previous: rg Up: ../eispad.html Next: rs


RGG(NM,N,A,B,ALFR,ALFI,BETA,MATZ,Z,IERR)

       SUBROUTINE RGG(NM,N,A,B,ALFR,ALFI,BETA,MATZ,Z,IERR)
 C
       INTEGER N,NM,IERR,MATZ
       DOUBLE PRECISION A(NM,N),B(NM,N),ALFR(N),ALFI(N),BETA(N),Z(NM,N)
       LOGICAL TF
 C
 C     THIS SUBROUTINE CALLS THE RECOMMENDED SEQUENCE OF
 C     SUBROUTINES FROM THE EIGENSYSTEM SUBROUTINE PACKAGE (EISPACK)
 C     TO FIND THE EIGENVALUES AND EIGENVECTORS (IF DESIRED)
 C     FOR THE REAL GENERAL GENERALIZED EIGENPROBLEM  AX = (LAMBDA)BX.
 C
 C     ON INPUT
 C
 C        NM  MUST BE SET TO THE ROW DIMENSION OF THE TWO-DIMENSIONAL
 C        ARRAY PARAMETERS AS DECLARED IN THE CALLING PROGRAM
 C        DIMENSION STATEMENT.
 C
 C        N  IS THE ORDER OF THE MATRICES  A  AND  B.
 C
 C        A  CONTAINS A REAL GENERAL MATRIX.
 C
 C        B  CONTAINS A REAL GENERAL MATRIX.
 C
 C        MATZ  IS AN INTEGER VARIABLE SET EQUAL TO ZERO IF
 C        ONLY EIGENVALUES ARE DESIRED.  OTHERWISE IT IS SET TO
 C        ANY NON-ZERO INTEGER FOR BOTH EIGENVALUES AND EIGENVECTORS.
 C
 C     ON OUTPUT
 C
 C        ALFR  AND  ALFI  CONTAIN THE REAL AND IMAGINARY PARTS,
 C        RESPECTIVELY, OF THE NUMERATORS OF THE EIGENVALUES.
 C
 C        BETA  CONTAINS THE DENOMINATORS OF THE EIGENVALUES,
 C        WHICH ARE THUS GIVEN BY THE RATIOS  (ALFR+I*ALFI)/BETA.
 C        COMPLEX CONJUGATE PAIRS OF EIGENVALUES APPEAR CONSECUTIVELY
 C        WITH THE EIGENVALUE HAVING THE POSITIVE IMAGINARY PART FIRST.
 C
 C        Z  CONTAINS THE REAL AND IMAGINARY PARTS OF THE EIGENVECTORS
 C        IF MATZ IS NOT ZERO.  IF THE J-TH EIGENVALUE IS REAL, THE
 C        J-TH COLUMN OF  Z  CONTAINS ITS EIGENVECTOR.  IF THE J-TH
 C        EIGENVALUE IS COMPLEX WITH POSITIVE IMAGINARY PART, THE
 C        J-TH AND (J+1)-TH COLUMNS OF  Z  CONTAIN THE REAL AND
 C        IMAGINARY PARTS OF ITS EIGENVECTOR.  THE CONJUGATE OF THIS
 C        VECTOR IS THE EIGENVECTOR FOR THE CONJUGATE EIGENVALUE.
 C
 C        IERR  IS AN INTEGER OUTPUT VARIABLE SET EQUAL TO AN ERROR
 C           COMPLETION CODE DESCRIBED IN THE DOCUMENTATION FOR QZIT.
 C           THE NORMAL COMPLETION CODE IS ZERO.
 C
 C     QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW,
 C     MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY
 C
 C     THIS VERSION DATED AUGUST 1983.
 C
 C     ------------------------------------------------------------------
 C