naginterfaces.library.lapackeig.dggesx

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

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

Estimates of condition numbers for selected generalized eigenvalue clusters and Schur vectors are also computed.

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

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

sensestr, length 1

Determines which reciprocal condition numbers are computed.

None are computed.

Computed for average of selected eigenvalues only.

Computed for selected deflating subspaces only.

Computed for both.

If , or , .

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

rcondefloat, ndarray, shape

If or , and contain the reciprocal condition numbers for the average of the selected eigenvalues.

If or , is not referenced.

rcondvfloat, ndarray, shape

If or , and contain the reciprocal condition numbers for the selected deflating subspaces.

if or , 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: , , or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

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

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 real Schur factorization of 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, dggesx 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.

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

The reciprocals of the condition estimates, the reciprocal values of the left and right projection norms, are returned in and respectively, for the selected generalized eigenvalues, together with reciprocal condition estimates for the corresponding left and right deflating subspaces, in and . See Section 4.11 of Anderson et al. (1999) for further information.

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