EigenSolver
Compute eigenvalues and eigenvectors of a regular square matrix using the classical algorithm (LAPACK function GEEV).
Computing for type matrix<double>
bool matrix::EigenSolver( |
Computing for type matrix<float>
bool matrixf::EigenSolver( |
Computing for type matrix<complex>
bool matrixc::EigenSolver( |
Computing for type matrix<complexf>
bool matrixcf::EigenSolver( |
Parameters
jobv
[in] ENUM_EIG_VECTORS enumeration value which determines the method for computing left and right eigenvectors.
EV
[out] Vector of eigenvalues.
left_eigenvectors
[out] Matrix of left eigenvectors.
right_eigenvectors
[out] Matrix of right eigenvectors.
Return Value
Return true if successful, otherwise false in case of an error.
Note
Computation depends on the value of the jobv parameter.
If EIGVECTORS_N is set, the left and right vectors are not computed. Only eigenvalues are computed.
With EIGVECTORS_L, only left eigenvectors are computed, right eigenvectors are not computed.
When EIGVECTORS_R is set, only the right eigenvectors are computed, the left vectors are not computed.
With EIGVECTORS_LR, the left and right eigenvectors are computed, Eigenvalues are always computed.
Real (non-complex) matrices can have a complex solution. Therefore, the vector of eigenvalues must be complex. In case of a complex solution, the error code is set to 4019 (ERR_MATH_OVERFLOW). Otherwise, only the real parts of the complex values of the eigenvalue vector should be used.
An enumeration that specifies whether to calculate eigenvectors.
ID | Description |
|---|---|
EIGVECTORS_N | Only eigenvalues are calculated, without vectors. |
EIGVECTORS_L | Only left eigenvectors are computed. |
EIGVECTORS_R | Only right eigenvectors are computed. |
EIGVECTORS_LR | Left and right eigenvectors are computed, eigenvalues are always computed. |