naginterfaces.library.lapackeig.zpteqr

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

zpteqr computes all the eigenvalues and, optionally, all the eigenvectors of a complex Hermitian positive definite matrix which has been reduced to tridiagonal form.

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

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/f08/f08juf.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 .

zcomplex, array-like, shape

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 : ; if : ; otherwise: .

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

If , need not be set.

Returns
dfloat, ndarray, shape

The eigenvalues in descending order, unless > 0, in which case is overwritten.

efloat, ndarray, shape

is overwritten.

zcomplex, 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: .

(errno )

The leading minor of order is not positive definite and the Cholesky factorization of could not be completed. Hence itself is not positive definite.

(errno )

The algorithm to compute the singular values of the Cholesky factor failed to converge; off-diagonal elements did not converge to zero.

Notes

zpteqr computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric positive definite 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

The function stores the real orthogonal matrix in a complex array, so that it may be used to compute all the eigenvalues and eigenvectors of a complex Hermitian positive definite matrix which has been reduced to tridiagonal form :

In this case, the matrix must be formed explicitly and passed to zpteqr, which must be called with . The functions which must be called to perform the reduction to tridiagonal form and form are:

full matrix

zhetrd() and zungtr()

full matrix, packed storage

zhptrd() and zupgtr()

band matrix

zhbtrd() with .

zpteqr first factorizes as where is unit lower bidiagonal and is diagonal. It forms the bidiagonal matrix , and then calls zbdsqr() to compute the singular values of which are the same as the eigenvalues of . The method used by the function allows high relative accuracy to be achieved in the small eigenvalues of . The eigenvectors are normalized so that , but are determined only to within a complex factor of absolute value .

References

Barlow, J and Demmel, J W, 1990, Computing accurate eigensystems of scaled diagonally dominant matrices, SIAM J. Numer. Anal. (27), 762–791