2
SUBROUTINE COMBAK (NM, LOW, IGH, AR, AI, INT, M, ZR, ZI)
3
C***BEGIN PROLOGUE COMBAK
4
C***PURPOSE Form the eigenvectors of a complex general matrix from the
5
C eigenvectors of a upper Hessenberg matrix output from
7
C***LIBRARY SLATEC (EISPACK)
9
C***TYPE COMPLEX (ELMBAK-S, COMBAK-C)
10
C***KEYWORDS EIGENVALUES, EIGENVECTORS, EISPACK
11
C***AUTHOR Smith, B. T., et al.
14
C This subroutine is a translation of the ALGOL procedure COMBAK,
15
C NUM. MATH. 12, 349-368(1968) by Martin and Wilkinson.
16
C HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 339-358(1971).
18
C This subroutine forms the eigenvectors of a COMPLEX GENERAL
19
C matrix by back transforming those of the corresponding
20
C upper Hessenberg matrix determined by COMHES.
24
C NM must be set to the row dimension of the two-dimensional
25
C array parameters, AR, AI, ZR and ZI, as declared in the
26
C calling program dimension statement. NM is an INTEGER
29
C LOW and IGH are two INTEGER variables determined by the
30
C balancing subroutine CBAL. If CBAL has not been used,
31
C set LOW=1 and IGH equal to the order of the matrix.
33
C AR and AI contain the multipliers which were used in the
34
C reduction by COMHES in their lower triangles below
35
C the subdiagonal. AR and AI are two-dimensional REAL
36
C arrays, dimensioned AR(NM,IGH) and AI(NM,IGH).
38
C INT contains information on the rows and columns
39
C interchanged in the reduction by COMHES. Only
40
C elements LOW through IGH are used. INT is a
41
C one-dimensional INTEGER array, dimensioned INT(IGH).
43
C M is the number of eigenvectors to be back transformed.
44
C M is an INTEGER variable.
46
C ZR and ZI contain the real and imaginary parts, respectively,
47
C of the eigenvectors to be back transformed in their first M
48
C columns. ZR and ZI are two-dimensional REAL arrays,
49
C dimensioned ZR(NM,M) and ZI(NM,M).
53
C ZR and ZI contain the real and imaginary parts, respectively,
54
C of the transformed eigenvectors in their first M columns.
56
C Questions and comments should be directed to B. S. Garbow,
57
C APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY
58
C ------------------------------------------------------------------
60
C***REFERENCES B. T. Smith, J. M. Boyle, J. J. Dongarra, B. S. Garbow,
61
C Y. Ikebe, V. C. Klema and C. B. Moler, Matrix Eigen-
62
C system Routines - EISPACK Guide, Springer-Verlag,
64
C***ROUTINES CALLED (NONE)
65
C***REVISION HISTORY (YYMMDD)
67
C 890831 Modified array declarations. (WRB)
68
C 890831 REVISION DATE from Version 3.2
69
C 891214 Prologue converted to Version 4.0 format. (BAB)
70
C 920501 Reformatted the REFERENCES section. (WRB)
71
C***END PROLOGUE COMBAK
73
INTEGER I,J,M,LA,MM,MP,NM,IGH,KP1,LOW,MP1
74
REAL AR(NM,*),AI(NM,*),ZR(NM,*),ZI(NM,*)
78
C***FIRST EXECUTABLE STATEMENT COMBAK
79
IF (M .EQ. 0) GO TO 200
82
IF (LA .LT. KP1) GO TO 200
83
C .......... FOR MP=IGH-1 STEP -1 UNTIL LOW+1 DO -- ..........
91
IF (XR .EQ. 0.0E0 .AND. XI .EQ. 0.0E0) GO TO 110
94
ZR(I,J) = ZR(I,J) + XR * ZR(MP,J) - XI * ZI(MP,J)
95
ZI(I,J) = ZI(I,J) + XR * ZI(MP,J) + XI * ZR(MP,J)
101
IF (I .EQ. MP) GO TO 140