naginterfaces.library.lapackeig.zhegvd

naginterfaces.library.lapackeig.zhegvd(itype, jobz, uplo, a, b)[source]

zhegvd computes all the eigenvalues and, optionally, the eigenvectors of a complex generalized Hermitian-definite eigenproblem, of the form

where and are Hermitian and is also positive definite. If eigenvectors are desired, it uses a divide-and-conquer algorithm.

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

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/f08/f08sqf.html

Parameters
itypeint

Specifies the problem type to be solved.

.

.

.

jobzstr, length 1

Indicates whether eigenvectors are computed.

Only eigenvalues are computed.

Eigenvalues and eigenvectors are computed.

uplostr, length 1

If , the upper triangles of and are stored.

If , the lower triangles of and are stored.

acomplex, array-like, shape

The Hermitian matrix .

bcomplex, array-like, shape

The Hermitian matrix .

Returns
acomplex, ndarray, shape

If , contains the matrix of eigenvectors. The eigenvectors are normalized as follows:

if or , ;

if , .

If , the upper triangle (if ) or the lower triangle (if ) of , including the diagonal, is overwritten.

bcomplex, ndarray, shape

The triangular factor or from the Cholesky factorization or .

wfloat, ndarray, shape

The eigenvalues in ascending order.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: or .

(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 an intermediate tridiagonal form did not converge to zero.

(errno )

If , for , then the leading minor of order of is not positive definite. The factorization of could not be completed and no eigenvalues or eigenvectors were computed.

Notes

zhegvd first performs a Cholesky factorization of the matrix as , when or , when . The generalized problem is then reduced to a standard symmetric eigenvalue problem

which is solved for the eigenvalues and, optionally, the eigenvectors; the eigenvectors are then backtransformed to give the eigenvectors of the original problem.

For the problem , the eigenvectors are normalized so that the matrix of eigenvectors, , satisfies

where is the diagonal matrix whose diagonal elements are the eigenvalues. For the problem we correspondingly have

and for we have

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