- EigenSolver
- EigenSolverX
- EigenSolverShur
- EigenSolver2
- EigenSolver2X
- EigenSolver2Shur
- EigenSolver2Blocked
- EigenSolver2ShurBlocked
EigenSolver2X
Compute generalized eigenvalues and eigenvectors for a pair of regular square matrices in Expert mode, i.e. with the ability to influence the computation algorithm and the ability to obtain accompanying computation data (lapack function GGEVX). Both matrices must be the same size.
Optionally, it also computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV).
Computing for type matrix<double>
bool matrix::EigenSolver2X(
|
Computing for type matrix<float>
bool matrixf::EigenSolver2X(
|
Computing for type matrix<complex>
bool matrixc::EigenSolver2X(
|
Computing for type matrix<complexf>
bool matrixcf::EigenSolver2X(
|
Parameters
B
[in] The second matrix in the pair.
balance
[in] Value from the ENUM_EIG_BALANCE enumeration which determines the need and method for balancing the input matrix; it is used to improve the conditioning of the eigenvalues and eigenvectors.
jobv
[in] Value from the ENUM_EIG_VECTORS enumeration which determines the method for computing left and right eigenvectors.
sense
[in] Value from the ENUM_EIG_SENSE enumeration which determines the need to compute reciprocal condition numbers.
eigen_values
[out] Vector of eigenvalues.
left_eigenvectors
[out] Matrix of left eigenvectors.
right_eigenvectors
[out] Matrix of right eigenvectors.
shur_matrix1, shur_matrix2
[out] 2 parts of balanced matrix in Schur form; the matrix is not filled if neither left nor right eigenvectors are computed.
ilo
[out] Subscript of the balanced matrix; the matrix is not filled if no balancing is applied.
ihi
[out] Superscript of the balanced matrix; the matrix is not filled if no balancing is applied.
lscale
[out] Vector contains details of the permutations and scaling factors applied to the left side of A and B.
If PL(j) is the index of the row interchanged with row j, and DL(j) is the scaling factor applied to row j, then
lscale(j) = PL(j), for j = 1,..., ilo-1
= DL(j), for j = ilo,...,ihi
= PL(j) for j = ihi+1,..., n.
The order in which the interchanges are made is n to ihi+1, then 1 to ilo-1.
rscale
[out] Vector contains details of the permutations and scaling factors applied to the right side of A and B.
If PR(j) is the index of the column interchanged with column j, and DR(j) is the scaling factor applied to column j, then
rscale(j) = PR(j), for j = 1,..., ilo-1
= DR(j), for j = ilo,...,ihi
= PR(j) for j = ihi+1,..., n.
The order in which the interchanges are made is n to ihi+1, then 1 to ilo-1.
ab_norm
[out] One-norm of the balanced input matrix (the maximum of the sum of absolute values of elements in any of the matrix columns).
bb_norm
[out] One-norm of balanced second matrix B.
rconde
[out] Vector of reciprocal condition numbers for each eigenvalue; it is computed if the 'sense' parameter is set to 'E' or 'B'.
rcondv
[out] Vector of reciprocal condition numbers for each eigenvector; it is computed if the 'sense' parameter is set to 'V' or 'B'.
Return Value
The function returns 'true' on success or 'false' if an error occurs.
Note
Input matrices balancing depends on the value of the balance parameter.
An enumeration that specifies whether the matrices should be balanced.
ID |
Description |
---|---|
EIGBALANCE_N |
Do not diagonally scale or permute. |
EIGBALANCE_P |
Perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale. |
EIGBALANCE_S |
Diagonally scale the matrix. Do not permute. |
EIGBALANCE_B |
Both diagonally scale and permute. |
ENUM_EIG_VECTORS
An enumeration defining the need to compute eigenvectors.
ID |
Description |
---|---|
EIGVECTORS_N |
Only eigenvalues are computed, 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. |
An enumeration determining the need to compute reciprocal condition numbers.
ID |
Description |
---|---|
EIGSENSE_N |
None of reciprocal condition numbers are computed. |
EIGSENSE_E |
Computed for eigenvalues only. |
EIGSENSE_V |
Computed for right eigenvectors only. |
EIGSENSE_B |
Computed for eigenvalues and right eigenvectors. |