Logo Search packages:      
Sourcecode: eigen3 version File versions  Download package

Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes

RealSchur< _MatrixType > Class Template Reference

Performs a real Schur decomposition of a square matrix. More...

#include <RealSchur.h>

Inheritance diagram for RealSchur< _MatrixType >:
Inheritance graph
[legend]
Collaboration diagram for RealSchur< _MatrixType >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
  MaxColsAtCompileTime = MatrixType::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 MatrixType::Index Index
typedef _MatrixType MatrixType
typedef MatrixType::Scalar Scalar

Public Member Functions

RealSchurcompute (const MatrixType &matrix, bool computeU=true)
 Computes Schur decomposition of given matrix.
ComputationInfo info () const
 Reports whether previous computation was successful.
const MatrixType & matrixT () const
 Returns the quasi-triangular matrix in the Schur decomposition.
const MatrixType & matrixU () const
 Returns the orthogonal matrix in the Schur decomposition.
 RealSchur (Index size=RowsAtCompileTime==Dynamic?1:RowsAtCompileTime)
 Default constructor.
 RealSchur (const MatrixType &matrix, bool computeU=true)
 Constructor; computes real Schur decomposition of given matrix.

Static Public Attributes

static const int m_maxIterations = 40
 Maximum number of iterations.

Private Types

typedef Matrix< Scalar, 3, 1 > Vector3s

Private Member Functions

Scalar computeNormOfT ()
void computeShift (Index iu, Index iter, Scalar &exshift, Vector3s &shiftInfo)
Index findSmallSubdiagEntry (Index iu, Scalar norm)
void initFrancisQRStep (Index il, Index iu, const Vector3s &shiftInfo, Index &im, Vector3s &firstHouseholderVector)
void performFrancisQRStep (Index il, Index im, Index iu, bool computeU, const Vector3s &firstHouseholderVector, Scalar *workspace)
void splitOffTwoRows (Index iu, bool computeU, Scalar exshift)

Private Attributes

HessenbergDecomposition
< MatrixType > 
m_hess
ComputationInfo m_info
bool m_isInitialized
MatrixType m_matT
MatrixType m_matU
bool m_matUisUptodate
ColumnVectorType m_workspaceVector

Detailed Description

template<typename _MatrixType>
class RealSchur< _MatrixType >

Performs a real Schur decomposition of a square matrix.

Template Parameters:
_MatrixTypethe type of the matrix of which we are computing the real Schur decomposition; this is expected to be an instantiation of the Matrix class template.

Given a real square matrix A, this class computes the real Schur decomposition: $ A = U T U^T $ where U is a real orthogonal matrix and T is a real 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 with complex eigenvalues. The eigenvalues of the blocks on the diagonal of T are the same as the eigenvalues of the matrix A, and thus the real Schur decomposition is used in EigenSolver to compute the eigendecomposition of a matrix.

Call the function compute() to compute the real Schur decomposition of a given matrix. Alternatively, you can use the RealSchur(const MatrixType&, bool) constructor which computes the real Schur decomposition at construction time. Once the decomposition is computed, you can use the matrixU() and matrixT() functions to retrieve the matrices U and T in the decomposition.

The documentation of RealSchur(const MatrixType&, bool) contains an example of the typical use of this class.

Note:
The implementation is adapted from JAMA (public domain). Their code is based on EISPACK.
See also:
class ComplexSchur, class EigenSolver, class ComplexEigenSolver

Definition at line 68 of file RealSchur.h.


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

Generated by  Doxygen 1.6.0   Back to index