WPILibC++ 2023.4.3-108-ge5452e3
Eigen::RealQZ< _MatrixType > Class Template Reference

\eigenvalues_module More...

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/Eigenvalues/RealQZ.h>

Public Types

enum  {
  RowsAtCompileTime = MatrixType::RowsAtCompileTime , ColsAtCompileTime = MatrixType::ColsAtCompileTime , Options = MatrixType::Options , MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime ,
  MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
}
 
typedef _MatrixType MatrixType
 
typedef MatrixType::Scalar Scalar
 
typedef std::complex< typename NumTraits< Scalar >::Real > ComplexScalar
 
typedef Eigen::Index Index
 
typedef Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > EigenvalueType
 
typedef Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > ColumnVectorType
 

Public Member Functions

 RealQZ (Index size=RowsAtCompileTime==Dynamic ? 1 :RowsAtCompileTime)
 Default constructor. More...
 
 RealQZ (const MatrixType &A, const MatrixType &B, bool computeQZ=true)
 Constructor; computes real QZ decomposition of given matrices. More...
 
const MatrixTypematrixQ () const
 Returns matrix Q in the QZ decomposition. More...
 
const MatrixTypematrixZ () const
 Returns matrix Z in the QZ decomposition. More...
 
const MatrixTypematrixS () const
 Returns matrix S in the QZ decomposition. More...
 
const MatrixTypematrixT () const
 Returns matrix S in the QZ decomposition. More...
 
RealQZcompute (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...
 
RealQZsetMaxIterations (Index maxIters)
 Sets the maximal number of iterations allowed to converge to one eigenvalue or decouple the problem. More...
 

Detailed Description

template<typename _MatrixType>
class Eigen::RealQZ< _MatrixType >

\eigenvalues_module

Performs a real QZ decomposition of a pair of square matrices

Template Parameters
_MatrixTypethe 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:

Note
The implementation is based on the algorithm in "Matrix Computations" by Gene H. Golub and Charles F. Van Loan, and a paper "An algorithm for generalized eigenvalue problems" by C.B.Moler and G.W.Stewart.
See also
class RealSchur, class ComplexSchur, class EigenSolver, class ComplexEigenSolver

Member Typedef Documentation

◆ ColumnVectorType

template<typename _MatrixType >
typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> Eigen::RealQZ< _MatrixType >::ColumnVectorType

◆ ComplexScalar

template<typename _MatrixType >
typedef std::complex<typename NumTraits<Scalar>::Real> Eigen::RealQZ< _MatrixType >::ComplexScalar

◆ EigenvalueType

template<typename _MatrixType >
typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> Eigen::RealQZ< _MatrixType >::EigenvalueType

◆ Index

template<typename _MatrixType >
typedef Eigen::Index Eigen::RealQZ< _MatrixType >::Index
Deprecated:
since Eigen 3.3

◆ MatrixType

template<typename _MatrixType >
typedef _MatrixType Eigen::RealQZ< _MatrixType >::MatrixType

◆ Scalar

template<typename _MatrixType >
typedef MatrixType::Scalar Eigen::RealQZ< _MatrixType >::Scalar

Member Enumeration Documentation

◆ anonymous enum

template<typename _MatrixType >
anonymous enum
Enumerator
RowsAtCompileTime 
ColsAtCompileTime 
Options 
MaxRowsAtCompileTime 
MaxColsAtCompileTime 

Constructor & Destructor Documentation

◆ RealQZ() [1/2]

template<typename _MatrixType >
Eigen::RealQZ< _MatrixType >::RealQZ ( Index  size = RowsAtCompileTime==Dynamic ? 1 : RowsAtCompileTime)
inlineexplicit

Default constructor.

Parameters
[in]sizePositive 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.

See also
compute() for an example.

◆ RealQZ() [2/2]

template<typename _MatrixType >
Eigen::RealQZ< _MatrixType >::RealQZ ( const MatrixType A,
const MatrixType B,
bool  computeQZ = true 
)
inline

Constructor; computes real QZ decomposition of given matrices.

Parameters
[in]AMatrix A.
[in]BMatrix B.
[in]computeQZIf false, A and Z are not computed.

This constructor calls compute() to compute the QZ decomposition.

Member Function Documentation

◆ compute()

template<typename MatrixType >
RealQZ< MatrixType > & Eigen::RealQZ< MatrixType >::compute ( const MatrixType A,
const MatrixType B,
bool  computeQZ = true 
)

Computes QZ decomposition of given matrix.

Parameters
[in]AMatrix A.
[in]BMatrix B.
[in]computeQZIf false, A and Z are not computed.
Returns
Reference to *this

◆ info()

template<typename _MatrixType >
ComputationInfo Eigen::RealQZ< _MatrixType >::info ( ) const
inline

Reports whether previous computation was successful.

Returns
Success if computation was successful, NoConvergence otherwise.

◆ iterations()

template<typename _MatrixType >
Index Eigen::RealQZ< _MatrixType >::iterations ( ) const
inline

Returns number of performed QR-like iterations.

◆ matrixQ()

template<typename _MatrixType >
const MatrixType & Eigen::RealQZ< _MatrixType >::matrixQ ( void  ) const
inline

Returns matrix Q in the QZ decomposition.

Returns
A const reference to the matrix Q.

◆ matrixS()

template<typename _MatrixType >
const MatrixType & Eigen::RealQZ< _MatrixType >::matrixS ( ) const
inline

Returns matrix S in the QZ decomposition.

Returns
A const reference to the matrix S.

◆ matrixT()

template<typename _MatrixType >
const MatrixType & Eigen::RealQZ< _MatrixType >::matrixT ( ) const
inline

Returns matrix S in the QZ decomposition.

Returns
A const reference to the matrix S.

◆ matrixZ()

template<typename _MatrixType >
const MatrixType & Eigen::RealQZ< _MatrixType >::matrixZ ( ) const
inline

Returns matrix Z in the QZ decomposition.

Returns
A const reference to the matrix Z.

◆ setMaxIterations()

template<typename _MatrixType >
RealQZ & Eigen::RealQZ< _MatrixType >::setMaxIterations ( Index  maxIters)
inline

Sets the maximal number of iterations allowed to converge to one eigenvalue or decouple the problem.


The documentation for this class was generated from the following file: