naginterfaces.library.lapackeig.zggesx¶
- naginterfaces.library.lapackeig.zggesx(jobvsl, jobvsr, sort, sense, a, b, selctg=None, data=None)[source]¶
zggesx
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 .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 f08xp
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08xpf.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 , .
- 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. and are the diagonals of the complex Schur form . 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.
- 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. are not in Schur form, 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 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,
zggesx
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.zggesx
computes to have real non-negative diagonal entries. 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