naginterfaces.library.lapackeig.dspgvd

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

dspgvd computes all the eigenvalues and, optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form

where and are symmetric, stored in packed format, 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 f08tc

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

apfloat, array-like, shape

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

bpfloat, array-like, shape

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

Returns
apfloat, ndarray, shape

The contents of are destroyed.

bpfloat, 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.

zfloat, 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

dspgvd 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