naginterfaces.library.lapackeig.zggevx

naginterfaces.library.lapackeig.zggevx(balanc, jobvl, jobvr, sense, a, b)[source]

zggevx computes for a pair of complex nonsymmetric matrices the generalized eigenvalues and, optionally, the left and/or right generalized eigenvectors using the algorithm.

Optionally it also computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors, reciprocal condition numbers for the eigenvalues, and reciprocal condition numbers for the right eigenvectors.

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

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

Parameters
balancstr, length 1

Specifies the balance option to be performed.

Do not diagonally scale or permute.

Permute only.

Scale only.

Both permute and scale.

Computed reciprocal condition numbers will be for the matrices after permuting and/or balancing.

Permuting does not change condition numbers (in exact arithmetic), but balancing does.

In the absence of other information, is recommended.

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.

sensestr, length 1

Determines which reciprocal condition numbers are computed.

None are computed.

Computed for eigenvalues only.

Computed for eigenvectors only.

Computed for eigenvalues and eigenvectors.

acomplex, array-like, shape

The matrix in the pair .

bcomplex, array-like, shape

The matrix in the pair .

Returns
acomplex, ndarray, shape

has been overwritten. If or or both, then contains the first part of the Schur form of the ‘balanced’ versions of the input and .

bcomplex, ndarray, shape

has been overwritten.

alphacomplex, ndarray, shape

See the description of .

betacomplex, ndarray, shape

, for , will be the generalized eigenvalues.

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 .

vlcomplex, ndarray, shape

If , the left generalized eigenvectors are stored one after another in the columns of , in the same order as the corresponding eigenvalues. Each eigenvector will be scaled so the largest component will have .

If , is not referenced.

vrcomplex, ndarray, shape

If , the right generalized eigenvectors are stored one after another in the columns of , in the same order as the corresponding eigenvalues. Each eigenvector will be scaled so the largest component will have .

If , is not referenced.

iloint

and are integer values such that and if and or .

If or , and .

ihiint

and are integer values such that and if and or .

If or , and .

lscalefloat, ndarray, shape

Details of the permutations and scaling factors applied to the left side of and .

If is the index of the row interchanged with row , and is the scaling factor applied to row , then:

, for ;

, for ;

, for .

The order in which the interchanges are made is to , then to .

rscalefloat, ndarray, shape

Details of the permutations and scaling factors applied to the right side of and .

If is the index of the column interchanged with column , and is the scaling factor applied to column , then:

, for ;

if , for ;

if , for .

The order in which the interchanges are made is to , then to .

abnrmfloat

The -norm of the balanced matrix .

bbnrmfloat

The -norm of the balanced matrix .

rcondefloat, ndarray, shape

If or , the reciprocal condition numbers of the eigenvalues, stored in consecutive elements of the array.

If or , is not referenced.

rcondvfloat, ndarray, shape

If or , the estimated reciprocal condition numbers of the selected eigenvectors, stored in consecutive elements of the array.

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.

(errno )

A failure occurred in ztgevc() 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 generalized eigenvector corresponding to the generalized eigenvalue of satisfies

The left generalized eigenvector corresponding to the generalized eigenvalue of satisfies

where is the conjugate-transpose of .

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

  1. is reduced to upper Hessenberg form (with real, non-negative subdiagonal elements) and at the same time is reduced to upper triangular form.

  2. is further reduced to triangular form while the triangular form of is maintained and the diagonal elements of are made real and non-negative. This is the generalized Schur form of the pair .

    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.

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

For details of the balancing option, see Notes for zggbal.

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