Previous: qzit Up: ../eispas.html Next: qzvec


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

       SUBROUTINE QZVAL(NM,N,A,B,ALFR,ALFI,BETA,MATZ,Z)
 C
       INTEGER I,J,N,EN,NA,NM,NN,ISW
       REAL A(NM,N),B(NM,N),ALFR(N),ALFI(N),BETA(N),Z(NM,N)
       REAL C,D,E,R,S,T,AN,A1,A2,BN,CQ,CZ,DI,DR,EI,TI,TR,U1,
      X       U2,V1,V2,A1I,A11,A12,A2I,A21,A22,B11,B12,B22,SQI,SQR,
      X       SSI,SSR,SZI,SZR,A11I,A11R,A12I,A12R,A22I,A22R,EPSB
       LOGICAL MATZ
 C
 C     THIS SUBROUTINE IS THE THIRD STEP OF THE QZ ALGORITHM
 C     FOR SOLVING GENERALIZED MATRIX EIGENVALUE PROBLEMS,
 C     SIAM J. NUMER. ANAL. 10, 241-256(1973) BY MOLER AND STEWART.
 C
 C     THIS SUBROUTINE ACCEPTS A PAIR OF REAL MATRICES, ONE OF THEM
 C     IN QUASI-TRIANGULAR FORM AND THE OTHER IN UPPER TRIANGULAR FORM.
 C     IT REDUCES THE QUASI-TRIANGULAR MATRIX FURTHER, SO THAT ANY
 C     REMAINING 2-BY-2 BLOCKS CORRESPOND TO PAIRS OF COMPLEX
 C     EIGENVALUES, AND RETURNS QUANTITIES WHOSE RATIOS GIVE THE
 C     GENERALIZED EIGENVALUES.  IT IS USUALLY PRECEDED BY  QZHES
 C     AND  QZIT  AND MAY BE FOLLOWED BY  QZVEC.
 C
 C     ON INPUT
 C
 C        NM MUST BE SET TO THE ROW DIMENSION OF TWO-DIMENSIONAL
 C          ARRAY PARAMETERS AS DECLARED IN THE CALLING PROGRAM
 C          DIMENSION STATEMENT.
 C
 C        N IS THE ORDER OF THE MATRICES.
 C
 C        A CONTAINS A REAL UPPER QUASI-TRIANGULAR MATRIX.
 C
 C        B CONTAINS A REAL UPPER TRIANGULAR MATRIX.  IN ADDITION,
 C          LOCATION B(N,1) CONTAINS THE TOLERANCE QUANTITY (EPSB)
 C          COMPUTED AND SAVED IN  QZIT.
 C
 C        MATZ SHOULD BE SET TO .TRUE. IF THE RIGHT HAND TRANSFORMATIONS
 C          ARE TO BE ACCUMULATED FOR LATER USE IN COMPUTING
 C          EIGENVECTORS, AND TO .FALSE. OTHERWISE.
 C
 C        Z CONTAINS, IF MATZ HAS BEEN SET TO .TRUE., THE
 C          TRANSFORMATION MATRIX PRODUCED IN THE REDUCTIONS BY QZHES
 C          AND QZIT, IF PERFORMED, OR ELSE THE IDENTITY MATRIX.
 C          IF MATZ HAS BEEN SET TO .FALSE., Z IS NOT REFERENCED.
 C
 C     ON OUTPUT
 C
 C        A HAS BEEN REDUCED FURTHER TO A QUASI-TRIANGULAR MATRIX
 C          IN WHICH ALL NONZERO SUBDIAGONAL ELEMENTS CORRESPOND TO
 C          PAIRS OF COMPLEX EIGENVALUES.
 C
 C        B IS STILL IN UPPER TRIANGULAR FORM, ALTHOUGH ITS ELEMENTS
 C          HAVE BEEN ALTERED.  B(N,1) IS UNALTERED.
 C
 C        ALFR AND ALFI CONTAIN THE REAL AND IMAGINARY PARTS OF THE
 C          DIAGONAL ELEMENTS OF THE TRIANGULAR MATRIX THAT WOULD BE
 C          OBTAINED IF A WERE REDUCED COMPLETELY TO TRIANGULAR FORM
 C          BY UNITARY TRANSFORMATIONS.  NON-ZERO VALUES OF ALFI OCCUR
 C          IN PAIRS, THE FIRST MEMBER POSITIVE AND THE SECOND NEGATIVE.
 C
 C        BETA CONTAINS THE DIAGONAL ELEMENTS OF THE CORRESPONDING B,
 C          NORMALIZED TO BE REAL AND NON-NEGATIVE.  THE GENERALIZED
 C          EIGENVALUES ARE THEN THE RATIOS ((ALFR+I*ALFI)/BETA).
 C
 C        Z CONTAINS THE PRODUCT OF THE RIGHT HAND TRANSFORMATIONS
 C          (FOR ALL THREE STEPS) IF MATZ HAS BEEN SET TO .TRUE.
 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