naginterfaces.library.lapackeig.zhsein¶
- naginterfaces.library.lapackeig.zhsein(job, eigsrc, initv, select, h, w, vl=None, vr=None)[source]¶
zhsein
computes selected left and/or right eigenvectors of a complex upper Hessenberg matrix corresponding to specified eigenvalues, by inverse iteration.For full information please refer to the NAG Library document for f08px
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f08/f08pxf.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 ) were found using
zhseqr()
.The eigenvalues of were found using
zhseqr()
; 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 select the eigenvector corresponding to the eigenvalue , must be set to .
- hcomplex, array-like, shape
The upper Hessenberg matrix . If a NaN is detected in , the function will return with = -6.
- wcomplex, array-like, shape
The eigenvalues of the matrix . If , the array must be exactly as returned by
zhseqr()
.- vlNone or complex, 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 contain starting vectors for inverse iteration for the left eigenvectors. Each starting vector must be stored in the same column as will be used to store the corresponding eigenvector.
If , need not be set.
- vrNone or complex, 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 contain starting vectors for inverse iteration for the right eigenvectors. Each starting vector must be stored in the same column as will be used to store the corresponding eigenvector.
If , need not be set.
- Returns
- wcomplex, ndarray, shape
The real parts of some elements of may be modified, as close eigenvalues are perturbed slightly in searching for independent eigenvectors.
- vlNone or complex, 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.
If , is not referenced.
- vrNone or complex, 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.
If , is not referenced.
- mint
, the number of selected eigenvectors.
- ifaillint, ndarray, shape
If or , then if the selected left eigenvector converged and if the eigenvector stored in the th row or column of (corresponding to the th eigenvalue) failed to converge.
If , is not referenced.
- ifailrint, ndarray, shape
If or , then if the selected right eigenvector converged and if the eigenvector stored in the th column of (corresponding to the th eigenvalue) failed to converge.
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: .
- (errno )
eigenvectors (as indicated by arguments and/or ) failed to converge. The corresponding columns of and/or contain no useful information.
- Notes
zhsein
computes left and/or right eigenvectors of a complex upper Hessenberg matrix , corresponding to selected eigenvalues.The right eigenvector , and the left eigenvector , corresponding to an eigenvalue , are defined by:
The eigenvectors are computed by inverse iteration. They are scaled so that .
If has been formed by reduction of a complex general matrix to upper Hessenberg form, then the eigenvectors of may be transformed to eigenvectors of by a call to
zunmhr()
.
- References
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore