Performs a real QZ decomposition of a pair of square matrices. More...
Public Types | |
enum | { RowsAtCompileTime , ColsAtCompileTime , Options , MaxRowsAtCompileTime , MaxColsAtCompileTime } |
typedef Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > | ColumnVectorType |
typedef std::complex< typename NumTraits< Scalar >::Real > | ComplexScalar |
typedef Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > | EigenvalueType |
typedef Eigen::Index | Index |
typedef MatrixType_ | MatrixType |
typedef MatrixType::Scalar | Scalar |
Public Member Functions | |
RealQZ & | compute (const MatrixType &A, const MatrixType &B, bool computeQZ=true) |
Computes QZ decomposition of given matrix. More... | |
ComputationInfo | info () const |
Reports whether previous computation was successful. More... | |
Index | iterations () const |
Returns number of performed QR-like iterations. More... | |
const MatrixType & | matrixQ () const |
Returns matrix Q in the QZ decomposition. More... | |
const MatrixType & | matrixS () const |
Returns matrix S in the QZ decomposition. More... | |
const MatrixType & | matrixT () const |
Returns matrix S in the QZ decomposition. More... | |
const MatrixType & | matrixZ () const |
Returns matrix Z in the QZ decomposition. More... | |
RealQZ (const MatrixType &A, const MatrixType &B, bool computeQZ=true) | |
Constructor; computes real QZ decomposition of given matrices. More... | |
RealQZ (Index size=RowsAtCompileTime==Dynamic ? 1 :RowsAtCompileTime) | |
Default constructor. More... | |
RealQZ & | setMaxIterations (Index maxIters) |
Private Types | |
typedef JacobiRotation< Scalar > | JRs |
typedef Matrix< Scalar, 2, 2 > | Matrix2s |
typedef Matrix< Scalar, 2, 1 > | Vector2s |
typedef Matrix< Scalar, 3, 1 > | Vector3s |
Private Member Functions | |
void | computeNorms () |
Index | findSmallDiagEntry (Index f, Index l) |
Index | findSmallSubdiagEntry (Index iu) |
void | hessenbergTriangular () |
void | pushDownZero (Index z, Index f, Index l) |
void | splitOffTwoRows (Index i) |
void | step (Index f, Index l, Index iter) |
Private Attributes | |
bool | m_computeQZ |
Index | m_global_iter |
ComputationInfo | m_info |
bool | m_isInitialized |
Index | m_maxIters |
Scalar | m_normOfS |
Scalar | m_normOfT |
MatrixType | m_Q |
MatrixType | m_S |
MatrixType | m_T |
Matrix< Scalar, Dynamic, 1 > | m_workspace |
MatrixType | m_Z |
Performs a real QZ decomposition of a pair of square matrices.
This is defined in the Eigenvalues module.
MatrixType_ | the type of the matrix of which we are computing the real QZ decomposition; this is expected to be an instantiation of the Matrix class template. |
Given a real square matrices A and B, this class computes the real QZ decomposition: \( A = Q S Z \), \( B = Q T Z \) where Q and Z are real orthogonal matrixes, T is upper-triangular matrix, and S is upper quasi-triangular matrix. An orthogonal matrix is a matrix whose inverse is equal to its transpose, \( U^{-1} = U^T \). A quasi-triangular matrix is a block-triangular matrix whose diagonal consists of 1-by-1 blocks and 2-by-2 blocks where further reduction is impossible due to complex eigenvalues.
The eigenvalues of the pencil \( A - z B \) can be obtained from 1x1 and 2x2 blocks on the diagonals of S and T.
Call the function compute() to compute the real QZ decomposition of a given pair of matrices. Alternatively, you can use the RealQZ(const MatrixType& B, const MatrixType& B, bool computeQZ) constructor which computes the real QZ decomposition at construction time. Once the decomposition is computed, you can use the matrixS(), matrixT(), matrixQ() and matrixZ() functions to retrieve the matrices S, T, Q and Z in the decomposition. If computeQZ==false, some time is saved by not computing matrices Q and Z.
Example:
Output:
typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> Eigen::RealQZ< MatrixType_ >::ColumnVectorType |
typedef std::complex<typename NumTraits<Scalar>::Real> Eigen::RealQZ< MatrixType_ >::ComplexScalar |
typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> Eigen::RealQZ< MatrixType_ >::EigenvalueType |
typedef Eigen::Index Eigen::RealQZ< MatrixType_ >::Index |
|
private |
|
private |
typedef MatrixType_ Eigen::RealQZ< MatrixType_ >::MatrixType |
typedef MatrixType::Scalar Eigen::RealQZ< MatrixType_ >::Scalar |
|
private |
|
private |
anonymous enum |
|
inlineexplicit |
Default constructor.
[in] | size | Positive integer, size of the matrix whose QZ decomposition will be computed. |
The default constructor is useful in cases in which the user intends to perform decompositions via compute(). The size
parameter is only used as a hint. It is not an error to give a wrong size
, but it may impair performance.
Definition at line 88 of file RealQZ.h.
|
inline |
Constructor; computes real QZ decomposition of given matrices.
This constructor calls compute() to compute the QZ decomposition.
Definition at line 107 of file RealQZ.h.
RealQZ< MatrixType > & Eigen::RealQZ< MatrixType >::compute | ( | const MatrixType & | A, |
const MatrixType & | B, | ||
bool | computeQZ = true |
||
) |
Computes QZ decomposition of given matrix.
*this
Definition at line 561 of file RealQZ.h.
|
inlineprivate |
Definition at line 269 of file RealQZ.h.
|
inlineprivate |
Definition at line 302 of file RealQZ.h.
|
inlineprivate |
|
private |
|
inline |
Reports whether previous computation was successful.
Success
if computation was successful, NoConvergence
otherwise.
|
inline |
|
inline |
Returns matrix Q in the QZ decomposition.
Definition at line 124 of file RealQZ.h.
|
inline |
Returns matrix S in the QZ decomposition.
|
inline |
Returns matrix S in the QZ decomposition.
|
inline |
Returns matrix Z in the QZ decomposition.
Definition at line 134 of file RealQZ.h.
|
inlineprivate |
|
inline |
Sets the maximal number of iterations allowed to converge to one eigenvalue or decouple the problem.
|
inlineprivate |
|
inlineprivate |
Definition at line 405 of file RealQZ.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |