Previous: comlr Up: ../eispas.html Next: comqr


COMLR2(NM,N,LOW,IGH,INT,HR,HI,WR,WI,ZR,ZI,IERR)

       SUBROUTINE COMLR2(NM,N,LOW,IGH,INT,HR,HI,WR,WI,ZR,ZI,IERR)
 C
       INTEGER I,J,K,L,M,N,EN,II,JJ,LL,MM,NM,NN,IGH,IM1,IP1,
      X        ITN,ITS,LOW,MP1,ENM1,IEND,IERR
       REAL HR(NM,N),HI(NM,N),WR(N),WI(N),ZR(NM,N),ZI(NM,N)
       REAL SI,SR,TI,TR,XI,XR,YI,YR,ZZI,ZZR,NORM,TST1,TST2
       INTEGER INT(IGH)
 C
 C     THIS SUBROUTINE IS A TRANSLATION OF THE ALGOL PROCEDURE COMLR2,
 C     NUM. MATH. 16, 181-204(1970) BY PETERS AND WILKINSON.
 C     HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 372-395(1971).
 C
 C     THIS SUBROUTINE FINDS THE EIGENVALUES AND EIGENVECTORS
 C     OF A COMPLEX UPPER HESSENBERG MATRIX BY THE MODIFIED LR
 C     METHOD.  THE EIGENVECTORS OF A COMPLEX GENERAL MATRIX
 C     CAN ALSO BE FOUND IF  COMHES  HAS BEEN USED TO REDUCE
 C     THIS GENERAL MATRIX TO HESSENBERG FORM.
 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 MATRIX.
 C
 C        LOW AND IGH ARE INTEGERS DETERMINED BY THE BALANCING
 C          SUBROUTINE  CBAL.  IF  CBAL  HAS NOT BEEN USED,
 C          SET LOW=1, IGH=N.
 C
 C        INT CONTAINS INFORMATION ON THE ROWS AND COLUMNS INTERCHANGED
 C          IN THE REDUCTION BY  COMHES, IF PERFORMED.  ONLY ELEMENTS
 C          LOW THROUGH IGH ARE USED.  IF THE EIGENVECTORS OF THE HESSEN-
 C          BERG MATRIX ARE DESIRED, SET INT(J)=J FOR THESE ELEMENTS.
 C
 C        HR AND HI CONTAIN THE REAL AND IMAGINARY PARTS,
 C          RESPECTIVELY, OF THE COMPLEX UPPER HESSENBERG MATRIX.
 C          THEIR LOWER TRIANGLES BELOW THE SUBDIAGONAL CONTAIN THE
 C          MULTIPLIERS WHICH WERE USED IN THE REDUCTION BY  COMHES,
 C          IF PERFORMED.  IF THE EIGENVECTORS OF THE HESSENBERG
 C          MATRIX ARE DESIRED, THESE ELEMENTS MUST BE SET TO ZERO.
 C
 C     ON OUTPUT
 C
 C        THE UPPER HESSENBERG PORTIONS OF HR AND HI HAVE BEEN
 C          DESTROYED, BUT THE LOCATION HR(1,1) CONTAINS THE NORM
 C          OF THE TRIANGULARIZED MATRIX.
 C
 C        WR AND WI CONTAIN THE REAL AND IMAGINARY PARTS,
 C          RESPECTIVELY, OF THE EIGENVALUES.  IF AN ERROR
 C          EXIT IS MADE, THE EIGENVALUES SHOULD BE CORRECT
 C          FOR INDICES IERR+1,...,N.
 C
 C        ZR AND ZI CONTAIN THE REAL AND IMAGINARY PARTS,
 C          RESPECTIVELY, OF THE EIGENVECTORS.  THE EIGENVECTORS
 C          ARE UNNORMALIZED.  IF AN ERROR EXIT IS MADE, NONE OF
 C          THE EIGENVECTORS HAS BEEN FOUND.
 C
 C        IERR IS SET TO
 C          ZERO       FOR NORMAL RETURN,
 C          J          IF THE LIMIT OF 30*N ITERATIONS IS EXHAUSTED
 C                     WHILE THE J-TH EIGENVALUE IS BEING SOUGHT.
 C
 C
 C     CALLS CDIV FOR COMPLEX DIVISION.
 C     CALLS CSROOT FOR COMPLEX SQUARE ROOT.
 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