2
SUBROUTINE RST (NM, N, W, E, MATZ, Z, IERR)
4
C***PURPOSE Compute the eigenvalues and, optionally, the eigenvectors
5
C of a real symmetric tridiagonal matrix.
6
C***LIBRARY SLATEC (EISPACK)
8
C***TYPE SINGLE PRECISION (RST-S)
9
C***KEYWORDS EIGENVALUES, EIGENVECTORS, EISPACK
10
C***AUTHOR Smith, B. T., et al.
13
C This subroutine calls the recommended sequence of
14
C subroutines from the eigensystem subroutine package (EISPACK)
15
C to find the eigenvalues and eigenvectors (if desired)
16
C of a REAL SYMMETRIC TRIDIAGONAL matrix.
20
C NM must be set to the row dimension of the two-dimensional
21
C array parameter, Z, as declared in the calling program
22
C dimension statement. NM is an INTEGER variable.
24
C N is the order of the matrix. N is an INTEGER variable.
25
C N must be less than or equal to NM.
27
C W contains the diagonal elements of the real symmetric
28
C tridiagonal matrix. W is a one-dimensional REAL array,
31
C E contains the subdiagonal elements of the matrix in its last
32
C N-1 positions. E(1) is arbitrary. E is a one-dimensional
33
C REAL array, dimensioned E(N).
35
C MATZ is an INTEGER variable set equal to zero if only
36
C eigenvalues are desired. Otherwise, it is set to any
37
C non-zero integer for both eigenvalues and eigenvectors.
41
C W contains the eigenvalues in ascending order.
43
C Z contains the eigenvectors if MATZ is not zero. The eigen-
44
C vectors are orthonormal. Z is a two-dimensional REAL array,
45
C dimensioned Z(NM,N).
47
C IERR is an INTEGER flag set to
48
C Zero for normal return,
49
C 10*N if N is greater than NM,
50
C J if the J-th eigenvalue has not been
51
C determined after 30 iterations.
52
C The eigenvalues and eigenvectors in the W and Z
53
C arrays should be correct for indices
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 IMTQL1, IMTQL2
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)
73
INTEGER I,J,N,NM,IERR,MATZ
74
REAL W(*),E(*),Z(NM,*)
76
C***FIRST EXECUTABLE STATEMENT RST
77
IF (N .LE. NM) GO TO 10
81
10 IF (MATZ .NE. 0) GO TO 20
82
C .......... FIND EIGENVALUES ONLY ..........
83
CALL IMTQL1(N,W,E,IERR)
85
C .......... FIND BOTH EIGENVALUES AND EIGENVECTORS ..........
95
CALL IMTQL2(NM,N,W,E,Z,IERR)