A real symmetric matrix can be firstly be reduced to tridiagonal form via:
CALL TRED2(A,N,NP,D,E)
and then the eigenvalues and eigenvectors of the resulting tridiagonal matrix
are determined via:
CALL TQLI(D,E,N,NP,A)
SUBROUTINE TRED2(A,N,NP,D,E)
On input:
A is an N by N input matrix stored in an array of physical dimension of
NP by NP.
On output:
the matrix A is replaced by the orthogonal matrix effecting the Housholder
reduction.
the vector D is replaced by the diagonal elements of the tridiagonal matrix.
the vector E is replaced by the off-diagonal elements of the tridiagonal matrix
with E(1)=0.
SUBROUTINE TQLI(D,E,N,NP,Z)
On input:
the vector D contains the diagonal elements of the tridiagonal matrix.
the vector E contains the off-diagonal elements of the tridiagonal matrix with
E(1)=0.
the matrix Z contains either the identity matrix if we want the eigenvectors of
the tridiagonal matrix, or the orthogonal matrix effecting the Housholder
reduction (output by TRED2 in matrix A) if we want the eigenvectors of the
original real symmetric matrix (originally in A).
On output:
the matrix Z is replaced by the eigenvectors with the kth column containing the
eigenvector corresponding to the eigenvalue D(k).
the vector D is replaced by the eigenvalues.
the vector E is destroyed on output.