naginterfaces.library.lapackeig.dtgevc¶
- naginterfaces.library.lapackeig.dtgevc(side, howmny, a, b, select=None, vl=None, vr=None)[source]¶
dtgevc
computes some or all of the right and/or left generalized eigenvectors of a pair of real matrices which are in generalized real Schur form.For full information please refer to the NAG Library document for f08yk
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08ykf.html
- Parameters
- sidestr, length 1
Specifies the required sets of generalized eigenvectors.
Only right eigenvectors are computed.
Only left eigenvectors are computed.
Both left and right eigenvectors are computed.
- howmnystr, length 1
Specifies further details of the required generalized eigenvectors.
All right and/or left eigenvectors are computed.
All right and/or left eigenvectors are computed; they are backtransformed using the input matrices supplied in arrays and/or .
Selected right and/or left eigenvectors, defined by the array , are computed.
- afloat, array-like, shape
The matrix pair must be in the generalized Schur form. Usually, this is the matrix returned by
dhgeqz()
.- bfloat, array-like, shape
The matrix pair must be in the generalized Schur form. If has a diagonal block then the corresponding block of must be diagonal with positive elements. Usually, this is the matrix returned by
dhgeqz()
.- selectNone or bool, array-like, shape , optional
Note: the required length for this argument is determined as follows: if : ; otherwise: .
Specifies the eigenvectors to be computed if . To select the generalized eigenvector corresponding to the th generalized eigenvalue, the th element of should be set to ; if the eigenvalue corresponds to a complex conjugate pair, then real and imaginary parts of eigenvectors corresponding to the complex conjugate eigenvalue pair will be computed.
If or , is not referenced.
- vlNone or float, array-like, shape , optional
Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .
Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; otherwise: .
If and or , must be initialized to an matrix . Usually, this is the orthogonal matrix of left Schur vectors returned by
dhgeqz()
.- vrNone or float, array-like, shape , optional
Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .
Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; otherwise: .
If and or , must be initialized to an matrix . Usually, this is the orthogonal matrix of right Schur vectors returned by
dhgeqz()
.
- Returns
- vlNone or float, ndarray, shape
If or , contains:
if , the matrix of left eigenvectors of ;
if , the matrix ;
if , the left eigenvectors of specified by , stored consecutively in the columns of the array , in the same order as their corresponding eigenvalues.
A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part.
If , is not referenced.
- vrNone or float, ndarray, shape
If or , contains:
if , the matrix of right eigenvectors of ;
if , the matrix ;
if , the right eigenvectors of specified by , stored consecutively in the columns of the array , in the same order as their corresponding eigenvalues.
A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part.
If , is not referenced.
- mint
The number of columns in the arrays and/or actually used to store the eigenvectors. If or , is set to . Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns.
- 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 , for .
- (errno )
On entry, error in parameter .
Constraint: .
- (errno )
On entry, error in parameter .
- (errno )
On entry, error in parameter .
- (errno )
On entry, error in parameter .
- Warns
- NagAlgorithmicWarning
- (errno )
The block does not have complex eigenvalues.
- Notes
dtgevc
computes some or all of the right and/or left generalized eigenvectors of the matrix pair which is assumed to be in generalized upper Schur form. If the matrix pair is not in the generalized upper Schur form, thendhgeqz()
should be called before invokingdtgevc
.The right generalized eigenvector and the left generalized eigenvector of corresponding to a generalized eigenvalue are defined by
and
If a generalized eigenvalue is determined as , which is due to zero diagonal elements at the same locations in both and , a unit vector is returned as the corresponding eigenvector.
Note that the generalized eigenvalues are computed using
dhgeqz()
butdtgevc
does not explicitly require the generalized eigenvalues to compute eigenvectors. The ordering of the eigenvectors is based on the ordering of the eigenvalues as computed bydtgevc
.If all eigenvectors are requested, the function may either return the matrices and/or of right or left eigenvectors of , or the products and/or , where and are two matrices supplied by you. Usually, and are chosen as the orthogonal matrices returned by
dhgeqz()
. Equivalently, and are the left and right Schur vectors of the matrix pair supplied todhgeqz()
. In that case, and are the left and right generalized eigenvectors, respectively, of the matrix pair supplied todhgeqz()
.must be block upper triangular; with and diagonal blocks. Corresponding to each diagonal block is a complex conjugate pair of eigenvalues and eigenvectors; only one eigenvector of the pair is computed, namely the one corresponding to the eigenvalue with positive imaginary part. Each block gives a real generalized eigenvalue and a corresponding eigenvector.
- 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
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore
Moler, C B and Stewart, G W, 1973, An algorithm for generalized matrix eigenproblems, SIAM J. Numer. Anal. (10), 241–256
Stewart, G W and Sun, J-G, 1990, Matrix Perturbation Theory, Academic Press, London