naginterfaces.library.lapackeig.dstevd

naginterfaces.library.lapackeig.dstevd(job, d, e)[source]

dstevd computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix. If the eigenvectors are requested, then it uses a divide-and-conquer algorithm to compute eigenvalues and eigenvectors. However, if only eigenvalues are required, then it uses the Pal–Walker–Kahan variant of the or algorithm.

For full information please refer to the NAG Library document for f08jc

https://www.nag.com/numeric/nl/nagdoc_30/flhtml/f08/f08jcf.html

Parameters
jobstr, length 1

Indicates whether eigenvectors are computed.

Only eigenvalues are computed.

Eigenvalues and eigenvectors are computed.

dfloat, array-like, shape

The diagonal elements of the tridiagonal matrix .

efloat, array-like, shape

The off-diagonal elements of the tridiagonal matrix . The th element of this array is used as workspace.

Returns
dfloat, ndarray, shape

The eigenvalues of the matrix in ascending order.

efloat, ndarray, shape

is overwritten with intermediate results.

zfloat, ndarray, shape

If , is overwritten by the orthogonal matrix which contains the eigenvectors of .

If , is not referenced.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

The algorithm failed to converge; off-diagonal elements of did not converge to zero.

Notes

dstevd 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 as

where is a diagonal matrix whose diagonal elements are the eigenvalues , and is the orthogonal matrix whose columns are the eigenvectors . Thus

References

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore