naginterfaces.library.lapackeig.zgges3

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

zgges3 computes the generalized eigenvalues, the generalized Schur form and, optionally, the left and/or right generalized Schur vectors for a pair of complex nonsymmetric matrices .

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

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/f08/f08xqf.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 ).

nint

, the order of the matrices and .

acomplex, array-like, shape

The first of the pair of matrices, .

bcomplex, array-like, shape

The second of the pair of matrices, .

selctgNone or callable retval = selctg(a, 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
acomplex

An eigenvalue is selected if is .

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

bcomplex

An eigenvalue is selected if is .

Note that in the ill-conditioned case, a selected 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
acomplex, ndarray, shape

has been overwritten by its generalized Schur form .

bcomplex, ndarray, shape

has been overwritten by its generalized Schur form .

sdimint

If , .

If , number of eigenvalues (after sorting) for which is .

alphacomplex, ndarray, shape

See the description of .

betacomplex, ndarray, shape

, for , will be the generalized eigenvalues. , for and , for , are the diagonals of the complex Schur form output by zgges3. The will be non-negative real.

Note: the quotients 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 .

vslcomplex, ndarray, shape

If , will contain the left Schur vectors, .

If , is not referenced.

vsrcomplex, 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 )

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

Warns
NagAlgorithmicWarning
(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).

(errno )

The iteration did not converge and the matrix pair is not in the generalized Schur form. The computed and should be correct for .

Notes

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

where and are unitary, and are upper triangular. 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, zgges3 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.

zgges3 computes to have real non-negative diagonal entries. 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, 2012, Matrix Computations, (4th Edition), Johns Hopkins University Press, Baltimore