naginterfaces.library.lapackeig.dhsein

naginterfaces.library.lapackeig.dhsein(job, eigsrc, initv, select, h, wr, wi, vl, vr)[source]

dhsein computes selected left and/or right eigenvectors of a real upper Hessenberg matrix corresponding to specified eigenvalues, by inverse iteration.

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08pkf.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.

eigsrcstr, length 1

Indicates whether the eigenvalues of (stored in and ) were found using dhseqr().

The eigenvalues of were found using dhseqr(); thus if has any zero subdiagonal elements (and so is block triangular), then the th eigenvalue can be assumed to be an eigenvalue of the block containing the th row/column. This property allows the function to perform inverse iteration on just one diagonal block.

No such assumption is made and the function performs inverse iteration using the whole matrix.

initvstr, length 1

Indicates whether you are supplying initial estimates for the selected eigenvectors.

No initial estimates are supplied.

Initial estimates are supplied in and/or .

selectbool, array-like, shape

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

hfloat, array-like, shape

The upper Hessenberg matrix . If a NaN is detected in , the function will return with = -6.

wrfloat, array-like, shape

The real and imaginary parts, respectively, of the eigenvalues of the matrix . Complex conjugate pairs of values must be stored in consecutive elements of the arrays. If , the arrays must be exactly as returned by dhseqr().

wifloat, array-like, shape

The real and imaginary parts, respectively, of the eigenvalues of the matrix . Complex conjugate pairs of values must be stored in consecutive elements of the arrays. If , the arrays must be exactly as returned by dhseqr().

vlfloat, array-like, shape

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 contain starting vectors for inverse iteration for the left eigenvectors. Each starting vector must be stored in the same column or columns as will be used to store the corresponding eigenvector.

If , need not be set.

vrfloat, array-like, shape

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 contain starting vectors for inverse iteration for the right eigenvectors. Each starting vector must be stored in the same column or columns as will be used to store the corresponding eigenvector.

If , need not be set.

Returns
selectbool, ndarray, shape

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

wrfloat, ndarray, shape

Some elements of may be modified, as close eigenvalues are perturbed slightly in searching for independent eigenvectors.

vlfloat, ndarray, shape

If or , contains the computed left eigenvectors (as specified by ). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues. Corresponding to each selected real eigenvalue is a real eigenvector, occupying one column. Corresponding to each selected complex eigenvalue 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.

vrfloat, ndarray, shape

If or , contains the computed right eigenvectors (as specified by ). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues. Corresponding to each selected real eigenvalue is a real eigenvector, occupying one column. Corresponding to each selected complex eigenvalue 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 required to store the selected eigenvectors.

ifaillint, ndarray, shape

If or , then if the selected left eigenvector converged and if the eigenvector stored in the th column of (corresponding to the th eigenvalue as held in failed to converge. If the th and th columns of contain a selected complex eigenvector, then and are set to the same value.

If , is not referenced.

ifailrint, ndarray, shape

If or , then if the selected right eigenvector converged and if the eigenvector stored in the th row or column of (corresponding to the th eigenvalue as held in ) failed to converge. If the th and th rows or columns of contain a selected complex eigenvector, then and are set to the same value.

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

(errno )

On entry, error in parameter .

Constraint: No element of is equal to NaN.

(errno )

On entry, error in parameter .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

eigenvectors (as indicated by arguments and/or ) failed to converge. The corresponding columns of and/or contain no useful information.

Notes

dhsein computes left and/or right eigenvectors of a real upper Hessenberg matrix , corresponding to selected eigenvalues.

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 eigenvectors are computed by inverse iteration. They are scaled so that, for a real eigenvector , , and for a complex eigenvector, .

If has been formed by reduction of a real general matrix to upper Hessenberg form, then the eigenvectors of may be transformed to eigenvectors of by a call to dormhr().

References

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