naginterfaces.library.lapackeig.zhpgv

naginterfaces.library.lapackeig.zhpgv(itype, jobz, uplo, n, ap, bp)[source]

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

where and are Hermitian, stored in packed format, and is also positive definite.

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

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

nint

, the order of the matrices and .

apcomplex, array-like, shape

The upper or lower triangle of the Hermitian matrix , packed by columns.

bpcomplex, array-like, shape

The upper or lower triangle of the Hermitian matrix , packed by columns.

Returns
apcomplex, ndarray, shape

The contents of are destroyed.

bpcomplex, ndarray, shape

The triangular factor or from the Cholesky factorization or , in the same storage format as .

wfloat, ndarray, shape

The eigenvalues in ascending order.

zcomplex, ndarray, shape

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

if or , ;

if , .

If , is not referenced.

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

zhpgv 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