naginterfaces.library.lapackeig.zstedc

naginterfaces.library.lapackeig.zstedc(compz, d, e, z)[source]

zstedc computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix, or of a complex full or banded Hermitian matrix which has been reduced to tridiagonal form.

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/f08/f08jvf.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 subdiagonal elements of the tridiagonal matrix.

zcomplex, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If , must contain the unitary matrix used in the reduction to tridiagonal form.

Returns
dfloat, ndarray, shape

If no exception or warning is raised, the eigenvalues in ascending order.

efloat, ndarray, shape

is overwritten.

zcomplex, ndarray, shape

If , contains the orthonormal eigenvectors of the original Hermitian matrix , and if , contains the orthonormal eigenvectors of the symmetric tridiagonal matrix .

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 compute an eigenvalue while working on the submatrix lying in rows and columns through .

Notes

zstedc computes all the eigenvalues and, optionally, the eigenvectors of a real symmetric tridiagonal matrix . That is, the function computes the spectral factorization of given by

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

The function may also be used to compute all the eigenvalues and eigenvectors of a complex full, or banded, Hermitian matrix which has been reduced to real tridiagonal form as

where is unitary. The spectral factorization of is then given by

In this case must be formed explicitly and passed to zstedc in the array , and the function called with . Functions which may be called to form and are

full matrix

zhetrd() and zungtr()

full matrix, packed storage

zhptrd() and zupgtr()

band matrix

zhbtrd(), with

When only eigenvalues are required then this function calls dsterf() to compute the eigenvalues of the tridiagonal matrix , but when eigenvectors of are also required and the matrix is not too small, then a divide and conquer method is used, which can be much faster than zsteqr(), although more storage is required.

References

Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia, https://www.netlib.org/lapack/lug

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