naginterfaces.library.lapackeig.dsygv¶
- naginterfaces.library.lapackeig.dsygv(itype, jobz, uplo, a, b)[source]¶
dsygv
computes all the eigenvalues and, optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the formwhere and are symmetric and is also positive definite.
For full information please refer to the NAG Library document for f08sa
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08saf.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.
- afloat, array-like, shape
The symmetric matrix .
- bfloat, array-like, shape
The symmetric positive definite matrix .
- Returns
- afloat, 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.
- bfloat, ndarray, shape
If the function exits successfully or = 1 … , the part of containing the matrix is overwritten by 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
dsygv
first performs a Cholesky factorization of the matrix as , when or , when . The generalized problem is then reduced to a standard symmetric eigenvalue problemwhich 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