naginterfaces.library.eigen.real_gen_eigsys¶
- naginterfaces.library.eigen.real_gen_eigsys(crit, a, wl, wu, mest)[source]¶
real_gen_eigsys
computes selected eigenvalues and eigenvectors of a real general matrix.For full information please refer to the NAG Library document for f02ec
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f02/f02ecf.html
- Parameters
- critstr, length 1
Indicates the criterion for selecting eigenvalues.
Eigenvalues are selected according to their moduli: .
Eigenvalues are selected according to their real parts: .
- afloat, array-like, shape
The general matrix .
- wlfloat
and , the lower and upper bounds on the criterion for the selected eigenvalues (see ).
- wufloat
and , the lower and upper bounds on the criterion for the selected eigenvalues (see ).
- mestint
must be an upper bound on , the number of eigenvalues and eigenvectors selected. No eigenvectors are computed if .
- Returns
- afloat, ndarray, shape
Contains the Hessenberg form of the balanced input matrix (see Further Comments).
- mint
, the number of eigenvalues actually selected.
- wrfloat, ndarray, shape
The first elements of and hold the real and imaginary parts, respectively, of the selected eigenvalues; elements to contain the other eigenvalues. Complex conjugate pairs of eigenvalues are stored in consecutive elements of the arrays, with the eigenvalue having positive imaginary part first. See also Further Comments.
- wifloat, ndarray, shape
The first elements of and hold the real and imaginary parts, respectively, of the selected eigenvalues; elements to contain the other eigenvalues. Complex conjugate pairs of eigenvalues are stored in consecutive elements of the arrays, with the eigenvalue having positive imaginary part first. See also Further Comments.
- vrfloat, ndarray, shape
Contains the real parts of the selected eigenvectors, with the th column holding the real part of the eigenvector associated with the eigenvalue (stored in and ).
- vifloat, ndarray, shape
Contains the imaginary parts of the selected eigenvectors, with the th column holding the imaginary part of the eigenvector associated with the eigenvalue (stored in and ).
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: or .
- (errno )
The algorithm failed to converge: only eigenvalues have been computed; no eigenvectors have been computed.
- (errno )
There are more than eigenvalues in the specified range. (number of eigenvalues in range) and . No eigenvectors have been computed. Rerun with second dimension of and .
- Warns
- NagAlgorithmicWarning
- (errno )
Inverse iteration failed to compute all the specified eigenvectors. The number of eigenvectors which failed to converge is . The corresponding columns of and are set to zero.
- Notes
In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.
real_gen_eigsys
computes selected eigenvalues and the corresponding right eigenvectors of a real general matrix :Eigenvalues may be selected either by modulus, satisfying:
or by real part, satisfying:
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 eigenvalues in a complex conjugate pair and are either both selected or both not selected.
- References
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore