Computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix using the Relatively Robust Representations.
The routine computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix
A. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
The routine first reduces the matrix
Ato tridiagonal form
T. Then, whenever possible,
?syevrcalls stemr to compute the eigenspectrum using Relatively Robust Representations. stemr computes eigenvalues by the
dqdsalgorithm, while orthogonal eigenvectors are computed from various "good"
representations (also known as Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows. For the each unreduced block of
- Compute, so thatT-σ*I=L*D*LTLandDdefine all the wanted eigenvalues to high relative accuracy. This means that small relative changes in the entries ofDandLcause only small relative changes in the eigenvalues and eigenvectors. The standard (unfactored) representation of the tridiagonal matrixTdoes not have this property in general.
- Compute the eigenvalues to suitable accuracy. If the eigenvectors are desired, the algorithm attains full accuracy of the computed eigenvalues only right before the corresponding vectors have to be computed, see Steps c) and d).
- For each cluster of close eigenvalues, select a new shift close to the cluster, find a new factorization, and refine the shifted eigenvalues to suitable accuracy.
- For each eigenvalue with a large enough relative separation, compute the corresponding eigenvector by forming a rank revealing twisted factorization. Go back to Step c) for any clusters that remain.
The desired accuracy of the output can be specified by the input parameter
Normal execution of
?dsyevrmay create NaNs and infinities and may abort due to a floating point exception in environments that do not handle NaNs and infinities in the IEEE standard default manner.
?syevris preferable for most cases of real symmetric eigenvalue problems as its underlying algorithm is fast and uses less workspace.