naginterfaces.library.lapackeig.dsteqr¶
- naginterfaces.library.lapackeig.dsteqr(compz, d, e, z=None)[source]¶
dsteqr
computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix, or of a real symmetric matrix which has been reduced to tridiagonal form.For full information please refer to the NAG Library document for f08je
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08jef.html
- Parameters
- compzstr, length 1
Indicates whether the eigenvectors are to be computed.
Only the eigenvalues are computed (and the array is not referenced).
The eigenvalues and eigenvectors of are computed (and the array must contain the matrix on entry).
The eigenvalues and eigenvectors of are computed (and the array is initialized by the function).
- dfloat, array-like, shape
The diagonal elements of the tridiagonal matrix .
- efloat, array-like, shape
The off-diagonal elements of the tridiagonal matrix .
- zNone or float, array-like, shape , optional
Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .
Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .
If , must contain the orthogonal matrix from the reduction to tridiagonal form.
If , need not be set.
- Returns
- dfloat, ndarray, shape
The eigenvalues in ascending order, unless > 0 (in which case see Exceptions).
- efloat, ndarray, shape
is overwritten.
- zNone or float, ndarray, shape
If or , the required orthonormal eigenvectors stored as columns of ; the th column corresponds to the th eigenvalue, where , unless > 0.
If , is not referenced.
- Raises
- NagValueError
- (errno )
On entry, error in parameter .
Constraint: , or .
- (errno )
On entry, error in parameter .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
The algorithm has failed to find all the eigenvalues after a total of iterations. In this case, and contain on exit the diagonal and off-diagonal elements, respectively, of a tridiagonal matrix orthogonally similar to . off-diagonal elements have not converged to zero.
- Notes
dsteqr
computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix . In other words, it can compute the spectral factorization of aswhere is a diagonal matrix whose diagonal elements are the eigenvalues , and is the orthogonal matrix whose columns are the eigenvectors . Thus
The function may also be used to compute all the eigenvalues and eigenvectors of a real symmetric matrix which has been reduced to tridiagonal form :
In this case, the matrix must be formed explicitly and passed to
dsteqr
, which must be called with . The functions which must be called to perform the reduction to tridiagonal form and form are:full matrix
full matrix, packed storage
band matrix
dsbtrd()
with .dsteqr
uses the implicitly shifted algorithm, switching between the and variants in order to handle graded matrices effectively (see Greenbaum and Dongarra (1980)). The eigenvectors are normalized so that , but are determined only to within a factor .If only the eigenvalues of are required, it is more efficient to call
dsterf()
instead. If is positive definite, small eigenvalues can be computed more accurately bydpteqr()
.
- References
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore
Greenbaum, A and Dongarra, J J, 1980, Experiments with QR/QL methods for the symmetric triangular eigenproblem, LAPACK Working Note No. 17 (Technical Report CS-89-92), University of Tennessee, Knoxville, https://www.netlib.org/lapack/lawnspdf/lawn17.pdf
Parlett, B N, 1998, The Symmetric Eigenvalue Problem, SIAM, Philadelphia