rebak.f 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. *DECK REBAK
  2. SUBROUTINE REBAK (NM, N, B, DL, M, Z)
  3. C***BEGIN PROLOGUE REBAK
  4. C***PURPOSE Form the eigenvectors of a generalized symmetric
  5. C eigensystem from the eigenvectors of derived matrix output
  6. C from REDUC or REDUC2.
  7. C***LIBRARY SLATEC (EISPACK)
  8. C***CATEGORY D4C4
  9. C***TYPE SINGLE PRECISION (REBAK-S)
  10. C***KEYWORDS EIGENVALUES, EIGENVECTORS, EISPACK
  11. C***AUTHOR Smith, B. T., et al.
  12. C***DESCRIPTION
  13. C
  14. C This subroutine is a translation of the ALGOL procedure REBAKA,
  15. C NUM. MATH. 11, 99-110(1968) by Martin and Wilkinson.
  16. C HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 303-314(1971).
  17. C
  18. C This subroutine forms the eigenvectors of a generalized
  19. C SYMMETRIC eigensystem by back transforming those of the
  20. C derived symmetric matrix determined by REDUC or REDUC2.
  21. C
  22. C On Input
  23. C
  24. C NM must be set to the row dimension of the two-dimensional
  25. C array parameters, B and Z, as declared in the calling
  26. C program dimension statement. NM is an INTEGER variable.
  27. C
  28. C N is the order of the matrix system. N is an INTEGER
  29. C variable. N must be less than or equal to NM.
  30. C
  31. C B contains information about the similarity transformation
  32. C (Cholesky decomposition) used in the reduction by REDUC
  33. C or REDUC2 in its strict lower triangle. B is a two-
  34. C dimensional REAL array, dimensioned B(NM,N).
  35. C
  36. C DL contains further information about the transformation.
  37. C DL is a one-dimensional REAL array, dimensioned DL(N).
  38. C
  39. C M is the number of eigenvectors to be back transformed.
  40. C M is an INTEGER variable.
  41. C
  42. C Z contains the eigenvectors to be back transformed in its
  43. C first M columns. Z is a two-dimensional REAL array
  44. C dimensioned Z(NM,M).
  45. C
  46. C On Output
  47. C
  48. C Z contains the transformed eigenvectors in its first
  49. C M columns.
  50. C
  51. C Questions and comments should be directed to B. S. Garbow,
  52. C APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY
  53. C ------------------------------------------------------------------
  54. C
  55. C***REFERENCES B. T. Smith, J. M. Boyle, J. J. Dongarra, B. S. Garbow,
  56. C Y. Ikebe, V. C. Klema and C. B. Moler, Matrix Eigen-
  57. C system Routines - EISPACK Guide, Springer-Verlag,
  58. C 1976.
  59. C***ROUTINES CALLED (NONE)
  60. C***REVISION HISTORY (YYMMDD)
  61. C 760101 DATE WRITTEN
  62. C 890831 Modified array declarations. (WRB)
  63. C 890831 REVISION DATE from Version 3.2
  64. C 891214 Prologue converted to Version 4.0 format. (BAB)
  65. C 920501 Reformatted the REFERENCES section. (WRB)
  66. C***END PROLOGUE REBAK
  67. C
  68. INTEGER I,J,K,M,N,I1,II,NM
  69. REAL B(NM,*),DL(*),Z(NM,*)
  70. REAL X
  71. C
  72. C***FIRST EXECUTABLE STATEMENT REBAK
  73. IF (M .EQ. 0) GO TO 200
  74. C
  75. DO 100 J = 1, M
  76. C .......... FOR I=N STEP -1 UNTIL 1 DO -- ..........
  77. DO 100 II = 1, N
  78. I = N + 1 - II
  79. I1 = I + 1
  80. X = Z(I,J)
  81. IF (I .EQ. N) GO TO 80
  82. C
  83. DO 60 K = I1, N
  84. 60 X = X - B(K,I) * Z(K,J)
  85. C
  86. 80 Z(I,J) = X / DL(I)
  87. 100 CONTINUE
  88. C
  89. 200 RETURN
  90. END