# naginterfaces.library.lapackeig.dgges¶

naginterfaces.library.lapackeig.dgges(jobvsl, jobvsr, sort, a, b, selctg=None, data=None)[source]

dgges computes the generalized eigenvalues, the generalized real Schur form and, optionally, the left and/or right generalized Schur vectors for a pair of real nonsymmetric matrices . dgges is marked as deprecated by LAPACK; the replacement routine is dgges3() which makes better use of Level 3 BLAS.

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

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

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f08/f08xaf.html

Parameters
jobvslstr, length 1

If , do not compute the left Schur vectors.

If , compute the left Schur vectors.

jobvsrstr, length 1

If , do not compute the right Schur vectors.

If , compute the right Schur vectors.

sortstr, length 1

Specifies whether or not to order the eigenvalues on the diagonal of the generalized Schur form.

Eigenvalues are not ordered.

Eigenvalues are ordered (see ).

afloat, array-like, shape

The first of the pair of matrices, .

bfloat, array-like, shape

The second of the pair of matrices, .

selctgNone or callable retval = selctg(ar, ai, b, data=None), optional

Note: if this argument is None then a NAG-supplied facility will be used.

If , is used to select generalized eigenvalues to be moved to the top left of the generalized Schur form.

Parameters
arfloat

An eigenvalue is selected if . If either one of a complex conjugate pair is selected, then both complex generalized eigenvalues are selected.

Note that in the ill-conditioned case, a selected complex generalized eigenvalue may no longer satisfy after ordering. = + 2 in this case.

aifloat

An eigenvalue is selected if . If either one of a complex conjugate pair is selected, then both complex generalized eigenvalues are selected.

Note that in the ill-conditioned case, a selected complex generalized eigenvalue may no longer satisfy after ordering. = + 2 in this case.

bfloat

An eigenvalue is selected if . If either one of a complex conjugate pair is selected, then both complex generalized eigenvalues are selected.

Note that in the ill-conditioned case, a selected complex generalized eigenvalue may no longer satisfy after ordering. = + 2 in this case.

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
retvalbool

Must be if the eigenvalue is to be selected.

dataarbitrary, optional

User-communication data for callback functions.

Returns
afloat, ndarray, shape

has been overwritten by its generalized Schur form .

bfloat, ndarray, shape

has been overwritten by its generalized Schur form .

sdimint

If , .

If , number of eigenvalues (after sorting) for which is . (Complex conjugate pairs for which is for either eigenvalue count as .)

alpharfloat, ndarray, shape

See the description of .

alphaifloat, ndarray, shape

See the description of .

betafloat, ndarray, shape

, for , will be the generalized eigenvalues. , and , for , are the diagonals of the complex Schur form that would result if the diagonal blocks of the real Schur form of were further reduced to triangular form using complex unitary transformations.

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, and will always be less than and usually comparable with in magnitude, and will always be less than and usually comparable with .

vslfloat, ndarray, shape

If , will contain the left Schur vectors, .

If , is not referenced.

vsrfloat, ndarray, shape

If , will contain the right Schur vectors, .

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 )

Warns
NagAlgorithmicWarning
(errno )

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

(errno )

After reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the generalized Schur form no longer satisfy . This could also be caused by underflow due to scaling.

(errno )

The eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned).

Notes

The generalized Schur factorization for a pair of real matrices is given by

where and are orthogonal, is upper triangular and is upper quasi-triangular with and diagonal blocks. The generalized eigenvalues, , of are computed from the diagonals of and and satisfy

where is the corresponding generalized eigenvector. is actually returned as the pair such that

since , or even both and can be zero. The columns of and are the left and right generalized Schur vectors of .

Optionally, dgges can order the generalized eigenvalues on the diagonals of so that selected eigenvalues are at the top left. The leading columns of and then form an orthonormal basis for the corresponding eigenspaces, the deflating subspaces.

dgges computes to have non-negative diagonal elements, and the blocks of correspond to complex conjugate pairs of generalized eigenvalues. The generalized Schur factorization, before reordering, is computed by the algorithm.

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