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

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

HessenbergDecomposition< _MatrixType > Class Template Reference

Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation. More...

#include <HessenbergDecomposition.h>

Inheritance diagram for HessenbergDecomposition< _MatrixType >:
Inheritance graph
Collaboration diagram for HessenbergDecomposition< _MatrixType >:
Collaboration graph

List of all members.

Public Types

enum  {
  Size = MatrixType::RowsAtCompileTime, SizeMinusOne = Size == Dynamic ? Dynamic : Size - 1, Options = MatrixType::Options, MaxSize = MatrixType::MaxRowsAtCompileTime,
  MaxSizeMinusOne = MaxSize == Dynamic ? Dynamic : MaxSize - 1
typedef Matrix< Scalar,
SizeMinusOne, 1, Options
&~RowMajor, MaxSizeMinusOne, 1 > 
 Type for vector of Householder coefficients.
typedef HouseholderSequence
< MatrixType, CoeffVectorType >
 Return type of matrixQ()
typedef MatrixType::Index Index
< MatrixType
typedef _MatrixType MatrixType
 Synonym for the template parameter _MatrixType.
typedef MatrixType::Scalar Scalar
 Scalar type for matrices of type MatrixType.

Public Member Functions

HessenbergDecompositioncompute (const MatrixType &matrix)
 Computes Hessenberg decomposition of given matrix.
 HessenbergDecomposition (const MatrixType &matrix)
 Constructor; computes Hessenberg decomposition of given matrix.
 HessenbergDecomposition (Index size=Size==Dynamic?2:Size)
 Default constructor; the decomposition will be computed later.
const CoeffVectorTypehouseholderCoefficients () const
 Returns the Householder coefficients.
MatrixHReturnType matrixH () const
 Constructs the Hessenberg matrix H in the decomposition.
HouseholderSequenceType matrixQ () const
 Reconstructs the orthogonal matrix Q in the decomposition.
const MatrixTypepackedMatrix () const
 Returns the internal representation of the decomposition.

Protected Attributes

CoeffVectorType m_hCoeffs
bool m_isInitialized
MatrixType m_matrix
VectorType m_temp

Private Types

typedef NumTraits< Scalar >::Real RealScalar
typedef Matrix< Scalar,
1, Size, Options|RowMajor,
1, MaxSize > 

Static Private Member Functions

static void _compute (MatrixType &matA, CoeffVectorType &hCoeffs, VectorType &temp)

Detailed Description

template<typename _MatrixType>
class HessenbergDecomposition< _MatrixType >

Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation.

Template Parameters:
_MatrixTypethe type of the matrix of which we are computing the Hessenberg decomposition

This class performs an Hessenberg decomposition of a matrix $ A $. In the real case, the Hessenberg decomposition consists of an orthogonal matrix $ Q $ and a Hessenberg matrix $ H $ such that $ A = Q H Q^T $. An orthogonal matrix is a matrix whose inverse equals its transpose ( $ Q^{-1} = Q^T $). A Hessenberg matrix has zeros below the subdiagonal, so it is almost upper triangular. The Hessenberg decomposition of a complex matrix is $ A = Q H Q^* $ with $ Q $ unitary (that is, $ Q^{-1} = Q^* $).

Call the function compute() to compute the Hessenberg decomposition of a given matrix. Alternatively, you can use the HessenbergDecomposition(const MatrixType&) constructor which computes the Hessenberg decomposition at construction time. Once the decomposition is computed, you can use the matrixH() and matrixQ() functions to construct the matrices H and Q in the decomposition.

The documentation for matrixH() contains an example of the typical use of this class.

See also:
class ComplexSchur, class Tridiagonalization, QR Module

Definition at line 70 of file HessenbergDecomposition.h.

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

Generated by  Doxygen 1.6.0   Back to index