Previous: comhes Up: ../eispas.html Next: comlr2


COMLR(NM,N,LOW,IGH,HR,HI,WR,WI,IERR)

       SUBROUTINE COMLR(NM,N,LOW,IGH,HR,HI,WR,WI,IERR)
 C
       INTEGER I,J,L,M,N,EN,LL,MM,NM,IGH,IM1,ITN,ITS,LOW,MP1,ENM1,IERR
       REAL HR(NM,N),HI(NM,N),WR(N),WI(N)
       REAL SI,SR,TI,TR,XI,XR,YI,YR,ZZI,ZZR,TST1,TST2
 C
 C     THIS SUBROUTINE IS A TRANSLATION OF THE ALGOL PROCEDURE COMLR,
 C     NUM. MATH. 12, 369-376(1968) BY MARTIN AND WILKINSON.
 C     HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 396-403(1971).
 C
 C     THIS SUBROUTINE FINDS THE EIGENVALUES OF A COMPLEX
 C     UPPER HESSENBERG MATRIX BY THE MODIFIED LR METHOD.
 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        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.
 C
 C     ON OUTPUT
 C
 C        THE UPPER HESSENBERG PORTIONS OF HR AND HI HAVE BEEN
 C          DESTROYED.  THEREFORE, THEY MUST BE SAVED BEFORE
 C          CALLING  COMLR  IF SUBSEQUENT CALCULATION OF
 C          EIGENVECTORS IS TO BE PERFORMED.
 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        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     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