naginterfaces.library.lapackeig.dtrevc

naginterfaces.library.lapackeig.dtrevc(job, howmny, t, select=None, vl=None, vr=None)[source]

dtrevc computes selected left and/or right eigenvectors of a real upper quasi-triangular matrix.

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

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

Parameters
jobstr, length 1

Indicates whether left and/or right eigenvectors are to be computed.

Only right eigenvectors are computed.

Only left eigenvectors are computed.

Both left and right eigenvectors are computed.

howmnystr, length 1

Indicates how many eigenvectors are to be computed.

All eigenvectors (as specified by ) are computed.

All eigenvectors (as specified by ) are computed and then pre-multiplied by the matrix (which is overwritten).

Selected eigenvectors (as specified by and ) are computed.

tfloat, array-like, shape

The upper quasi-triangular matrix in canonical Schur form, as returned by dhseqr().

selectNone or bool, array-like, shape , optional

Note: the required length for this argument is determined as follows: if : ; otherwise: .

Specifies which eigenvectors are to be computed if . To obtain the real eigenvector corresponding to the real eigenvalue , must be set . To select the complex eigenvector corresponding to a complex conjugate pair of eigenvalues and , and/or must be set ; the eigenvector corresponding to the first eigenvalue in the pair is computed.

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

If and or , must contain an matrix (usually the matrix of Schur vectors returned by dhseqr()).

If or , need not be set.

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

If and or , must contain an matrix (usually the matrix of Schur vectors returned by dhseqr()).

If or , need not be set.

Returns
selectNone or bool, ndarray, shape

If a complex eigenvector was selected as specified above, is set to and to .

If or , is not referenced.

vlNone or float, ndarray, shape

If or , contains the computed left eigenvectors (as specified by and ). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues. Corresponding to each real eigenvalue is a real eigenvector, occupying one column. Corresponding to each complex conjugate pair of eigenvalues, is a complex eigenvector occupying two columns; the first column holds the real part and the second column holds the imaginary part.

If , is not referenced.

vrNone or float, ndarray, shape

If or , contains the computed right eigenvectors (as specified by and ). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues. Corresponding to each real eigenvalue is a real eigenvector, occupying one column. Corresponding to each complex conjugate pair of eigenvalues, is a complex eigenvector occupying two columns; the first column holds the real part and the second column holds the imaginary part.

If , is not referenced.

mint

, the number of columns of and/or actually used to store the computed eigenvectors. If or , is set to .

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

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

Notes

dtrevc computes left and/or right eigenvectors of a real upper quasi-triangular matrix in canonical Schur form. Such a matrix arises from the Schur factorization of a real general matrix, as computed by dhseqr(), for example.

The right eigenvector , and the left eigenvector , corresponding to an eigenvalue , are defined by:

Note that even though is real, , and may be complex. If is an eigenvector corresponding to a complex eigenvalue , then the complex conjugate vector is the eigenvector corresponding to the complex conjugate eigenvalue .

The function can compute the eigenvectors corresponding to selected eigenvalues, or it can compute all the eigenvectors. In the latter case the eigenvectors may optionally be pre-multiplied by an input matrix . Normally is an orthogonal matrix from the Schur factorization of a matrix as ; if is a (left or right) eigenvector of , then is an eigenvector of .

The eigenvectors are computed by forward or backward substitution. They are scaled so that, for a real eigenvector , , and for a complex eigenvector, .

References

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore