Previous: qzval Up: ../eispad.html Next: ratqr


QZVEC(NM,N,A,B,ALFR,ALFI,BETA,Z)

       SUBROUTINE QZVEC(NM,N,A,B,ALFR,ALFI,BETA,Z)
 C
       INTEGER I,J,K,M,N,EN,II,JJ,NA,NM,NN,ISW,ENM2
       DOUBLE PRECISION A(NM,N),B(NM,N),ALFR(N),ALFI(N),BETA(N),Z(NM,N)
       DOUBLE PRECISION D,Q,R,S,T,W,X,Y,DI,DR,RA,RR,SA,TI,TR,T1,T2,W1,X1,
      X       ZZ,Z1,ALFM,ALMI,ALMR,BETM,EPSB
 C
 C     THIS SUBROUTINE IS THE OPTIONAL FOURTH 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 IN
 C     QUASI-TRIANGULAR FORM (IN WHICH EACH 2-BY-2 BLOCK CORRESPONDS TO
 C     A PAIR OF COMPLEX EIGENVALUES) AND THE OTHER IN UPPER TRIANGULAR
 C     FORM.  IT COMPUTES THE EIGENVECTORS OF THE TRIANGULAR PROBLEM AND
 C     TRANSFORMS THE RESULTS BACK TO THE ORIGINAL COORDINATE SYSTEM.
 C     IT IS USUALLY PRECEDED BY  QZHES,  QZIT, AND  QZVAL.
 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        ALFR, ALFI, AND BETA  ARE VECTORS WITH COMPONENTS WHOSE
 C          RATIOS ((ALFR+I*ALFI)/BETA) ARE THE GENERALIZED
 C          EIGENVALUES.  THEY ARE USUALLY OBTAINED FROM  QZVAL.
 C
 C        Z CONTAINS THE TRANSFORMATION MATRIX PRODUCED IN THE
 C          REDUCTIONS BY  QZHES,  QZIT, AND  QZVAL, IF PERFORMED.
 C          IF THE EIGENVECTORS OF THE TRIANGULAR PROBLEM ARE
 C          DESIRED, Z MUST CONTAIN THE IDENTITY MATRIX.
 C
 C     ON OUTPUT
 C
 C        A IS UNALTERED.  ITS SUBDIAGONAL ELEMENTS PROVIDE INFORMATION
 C           ABOUT THE STORAGE OF THE COMPLEX EIGENVECTORS.
 C
 C        B HAS BEEN DESTROYED.
 C
 C        ALFR, ALFI, AND BETA ARE UNALTERED.
 C
 C        Z CONTAINS THE REAL AND IMAGINARY PARTS OF THE EIGENVECTORS.
 C          IF ALFI(I) .EQ. 0.0, THE I-TH EIGENVALUE IS REAL AND
 C            THE I-TH COLUMN OF Z CONTAINS ITS EIGENVECTOR.
 C          IF ALFI(I) .NE. 0.0, THE I-TH EIGENVALUE IS COMPLEX.
 C            IF ALFI(I) .GT. 0.0, THE EIGENVALUE IS THE FIRST OF
 C              A COMPLEX PAIR AND THE I-TH AND (I+1)-TH COLUMNS
 C              OF Z CONTAIN ITS EIGENVECTOR.
 C            IF ALFI(I) .LT. 0.0, THE EIGENVALUE IS THE SECOND OF
 C              A COMPLEX PAIR AND THE (I-1)-TH AND I-TH COLUMNS
 C              OF Z CONTAIN THE CONJUGATE OF ITS EIGENVECTOR.
 C          EACH EIGENVECTOR IS NORMALIZED SO THAT THE MODULUS
 C          OF ITS LARGEST COMPONENT IS 1.0 .
 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