naginterfaces.library.lapackeig.dggev

naginterfaces.library.lapackeig.dggev(jobvl, jobvr, a, b)[source]

dggev computes for a pair of real nonsymmetric matrices the generalized eigenvalues and, optionally, the left and/or right generalized eigenvectors using the algorithm. dggev is marked as deprecated by LAPACK; the replacement routine is dggev3() which makes better use of Level 3 BLAS.

Deprecated since version 27.0.0.0: dggev is deprecated. Please use dggev3() instead. See also the Replacement Calls document.

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

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f08/f08waf.html

Parameters
jobvlstr, length 1

If , do not compute the left generalized eigenvectors.

If , compute the left generalized eigenvectors.

jobvrstr, length 1

If , do not compute the right generalized eigenvectors.

If , compute the right generalized eigenvectors.

afloat, array-like, shape

The matrix in the pair .

bfloat, array-like, shape

The matrix in the pair .

Returns
afloat, ndarray, shape

has been overwritten.

bfloat, ndarray, shape

has been overwritten.

alpharfloat, ndarray, shape

The element contains the real part of .

alphaifloat, ndarray, shape

The element contains the imaginary part of .

betafloat, ndarray, shape

, for , will be the generalized eigenvalues.

If is zero, then the th eigenvalue is real; if positive, then the th and st eigenvalues are a complex conjugate pair, with negative.

Note: the quotients and may easily overflow or underflow, and may even be zero.

Thus, you should avoid naively computing the ratio .

However, will always be less than and usually comparable with in magnitude, and will always be less than and usually comparable with .

vlfloat, ndarray, shape

If , the left eigenvectors are stored one after another in the columns of , in the same order as the corresponding eigenvalues.

If the th eigenvalue is real, then , the th column of .

If the th and th eigenvalues form a complex conjugate pair, then and .

Each eigenvector will be scaled so the largest component has .

If , is not referenced.

vrfloat, ndarray, shape

If , the right eigenvectors are stored one after another in the columns of , in the same order as the corresponding eigenvalues.

If the th eigenvalue is real, then , the th column of .

If the th and th eigenvalues form a complex conjugate pair, then and .

Each eigenvector will be scaled so the largest component has .

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

(errno )

The iteration failed with an unexpected error, please contact NAG.

(errno )

A failure occurred in dtgevc() while computing generalized eigenvectors.

Warns
NagAlgorithmicWarning
(errno )

The iteration failed. No eigenvectors have been calculated but , and should be correct from element .

Notes

A generalized eigenvalue for a pair of matrices is a scalar or a ratio , such that is singular. It is usually represented as the pair , as there is a reasonable interpretation for , and even for both being zero.

The right eigenvector corresponding to the eigenvalue of satisfies

The left eigenvector corresponding to the eigenvalue of satisfies

where is the conjugate-transpose of .

All the eigenvalues and, if required, all the eigenvectors of the generalized eigenproblem , where and are real, square matrices, are determined using the algorithm. The algorithm consists of four stages:

  1. is reduced to upper Hessenberg form and at the same time is reduced to upper triangular form.

  2. is further reduced to quasi-triangular form while the triangular form of is maintained. This is the real generalized Schur form of the pair .

  3. The quasi-triangular form of is reduced to triangular form and the eigenvalues extracted. This function does not actually produce the eigenvalues , but instead returns and such that

    The division by becomes your responsibility, since may be zero, indicating an infinite eigenvalue. Pairs of complex eigenvalues occur with and complex conjugates, even though and are not conjugate.

  4. If the eigenvectors are required they are obtained from the triangular matrices and then transformed back into the original coordinate system.

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, 2012, Matrix Computations, (4th Edition), Johns Hopkins University Press, Baltimore

Wilkinson, J H, 1979, Kronecker’s canonical form and the algorithm, Linear Algebra Appl. (28), 285–303