naginterfaces.library.lapackeig.zgeevx

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

zgeevx computes the eigenvalues and, optionally, the left and/or right eigenvectors for an complex nonsymmetric matrix .

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 f08np

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08npf.html

Parameters
balancstr, length 1

Indicates how the input matrix should be diagonally scaled and/or permuted to improve the conditioning of its eigenvalues.

Do not diagonally scale or permute.

Perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale.

Diagonally scale the matrix, i.e., replace , where is a diagonal matrix chosen to make the rows and columns of more equal in norm. Do not permute.

Both diagonally scale and permute .

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

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

jobvlstr, length 1

If , the left eigenvectors of are not computed.

If , the left eigenvectors of are computed.

If or , must be set to .

jobvrstr, length 1

If , the right eigenvectors of are not computed.

If , the right eigenvectors of are computed.

If or , must be set to .

sensestr, length 1

Determines which reciprocal condition numbers are computed.

None are computed.

Computed for eigenvalues only.

Computed for right eigenvectors only.

Computed for eigenvalues and right eigenvectors.

If or , both left and right eigenvectors must also be computed ( and ).

acomplex, array-like, shape

The matrix .

Returns
acomplex, ndarray, shape

has been overwritten. If or , contains the Schur form of the balanced version of the matrix .

wcomplex, ndarray, shape

Contains the computed eigenvalues.

vlcomplex, ndarray, shape

If , the left eigenvectors are stored one after another in the columns of , in the same order as their corresponding eigenvalues; that is , for .

If , is not referenced.

vrcomplex, ndarray, shape

If , the right eigenvectors are stored one after another in the columns of , in the same order as their corresponding eigenvalues; that is , for .

If , is not referenced.

iloint

and are integer values determined when was balanced. The balanced has if and or .

ihiint

and are integer values determined when was balanced. The balanced has if and or .

scalefloat, ndarray, shape

Details of the permutations and scaling factors applied when balancing .

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

, for ;

, for ;

, for .

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

abnrmfloat

The -norm of the balanced matrix (the maximum of the sum of absolute values of elements of any column).

rcondefloat, ndarray, shape

is the reciprocal condition number of the th eigenvalue.

rcondvfloat, ndarray, shape

is the reciprocal condition number of the th right eigenvector.

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

Warns
NagAlgorithmicWarning
(errno )

The algorithm failed to compute all the eigenvalues, and no eigenvectors or condition numbers have been computed; elements to and to of contain eigenvalues which have converged.

Notes

The right eigenvector of satisfies

where is the th eigenvalue of . The left eigenvector of satisfies

where denotes the conjugate transpose of .

Balancing a matrix means permuting the rows and columns to make it more nearly upper triangular, and applying a diagonal similarity transformation , where is a diagonal matrix, with the aim of making its rows and columns closer in norm and the condition numbers of its eigenvalues and eigenvectors smaller. The computed reciprocal condition numbers correspond to the balanced matrix. Permuting rows and columns will not change the condition numbers (in exact arithmetic) but diagonal scaling will. For further explanation of balancing, see Section 4.8.1.2 of Anderson et al. (1999).

Following the optional balancing, the matrix is first reduced to upper Hessenberg form by means of unitary similarity transformations, and the algorithm is then used to further reduce the matrix to upper triangular Schur form, , from which the eigenvalues are computed. Optionally, the eigenvectors of are also computed and backtransformed to those of .

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