Eigen::HessenbergDecomposition< _MatrixType > Class Template Reference

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

#include <HessenbergDecomposition.h>

List of all members.

Public Types

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

Public Member Functions

 HessenbergDecomposition (Index size=Size==Dynamic?2:Size)
 Default constructor; the decomposition will be computed later.
 HessenbergDecomposition (const MatrixType &matrix)
 Constructor; computes Hessenberg decomposition of given matrix.
HessenbergDecompositioncompute (const MatrixType &matrix)
 Computes Hessenberg decomposition of given matrix.
const CoeffVectorTypehouseholderCoefficients () const
 Returns the Householder coefficients.


Detailed Description

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

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

_MatrixType the 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 57 of file HessenbergDecomposition.h.


Member Typedef Documentation

template<typename _MatrixType>
typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> Eigen::HessenbergDecomposition< _MatrixType >::CoeffVectorType

Type for vector of Householder coefficients.

This is column vector with entries of type Scalar. The length of the vector is one less than the size of MatrixType, if it is a fixed-side type.

Definition at line 82 of file HessenbergDecomposition.h.

template<typename _MatrixType>
typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename CoeffVectorType::ConjugateReturnType>::type> Eigen::HessenbergDecomposition< _MatrixType >::HouseholderSequenceType

Return type of matrixQ().

Definition at line 85 of file HessenbergDecomposition.h.

template<typename _MatrixType>
typedef MatrixType::Index Eigen::HessenbergDecomposition< _MatrixType >::Index

Definition at line 74 of file HessenbergDecomposition.h.

template<typename _MatrixType>
typedef internal::HessenbergDecompositionMatrixHReturnType<MatrixType> Eigen::HessenbergDecomposition< _MatrixType >::MatrixHReturnType

Definition at line 87 of file HessenbergDecomposition.h.

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

Synonym for the template parameter _MatrixType.

Definition at line 62 of file HessenbergDecomposition.h.

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

Scalar type for matrices of type MatrixType.

Definition at line 73 of file HessenbergDecomposition.h.


Member Enumeration Documentation

template<typename _MatrixType>
anonymous enum

Enumerator:
Size 
SizeMinusOne 
Options 
MaxSize 
MaxSizeMinusOne 

Definition at line 64 of file HessenbergDecomposition.h.


Constructor & Destructor Documentation

template<typename _MatrixType>
Eigen::HessenbergDecomposition< _MatrixType >::HessenbergDecomposition ( Index  size = Size==Dynamic ? 2 : Size  )  [inline]

Default constructor; the decomposition will be computed later.

Parameters:
[in] size The size of the matrix whose Hessenberg 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.

Definition at line 100 of file HessenbergDecomposition.h.

template<typename _MatrixType>
Eigen::HessenbergDecomposition< _MatrixType >::HessenbergDecomposition ( const MatrixType matrix  )  [inline]

Constructor; computes Hessenberg decomposition of given matrix.

Parameters:
[in] matrix Square matrix whose Hessenberg decomposition is to be computed.
This constructor calls compute() to compute the Hessenberg decomposition.

See also:
matrixH() for an example.

Definition at line 118 of file HessenbergDecomposition.h.


Member Function Documentation

template<typename _MatrixType>
HessenbergDecomposition& Eigen::HessenbergDecomposition< _MatrixType >::compute ( const MatrixType matrix  )  [inline]

Computes Hessenberg decomposition of given matrix.

Parameters:
[in] matrix Square matrix whose Hessenberg decomposition is to be computed.
Returns:
Reference to *this
The Hessenberg decomposition is computed by bringing the columns of the matrix successively in the required form using Householder reflections (see, e.g., Algorithm 7.4.2 in Golub & Van Loan, Matrix Computations). The cost is $ 10n^3/3 $ flops, where $ n $ denotes the size of the given matrix.

This method reuses of the allocated data in the HessenbergDecomposition object.

Example:

Output:

Definition at line 150 of file HessenbergDecomposition.h.

Referenced by Eigen::RealSchur< _MatrixType >::compute(), Eigen::internal::complex_schur_reduce_to_hessenberg< MatrixType, false >::run(), and Eigen::internal::complex_schur_reduce_to_hessenberg< MatrixType, IsComplex >::run().

template<typename _MatrixType>
const CoeffVectorType& Eigen::HessenbergDecomposition< _MatrixType >::householderCoefficients (  )  const [inline]

Returns the Householder coefficients.

Returns:
a const reference to the vector of Householder coefficients
Precondition:
Either the constructor HessenbergDecomposition(const MatrixType&) or the member function compute(const MatrixType&) has been called before to compute the Hessenberg decomposition of a matrix.
The Householder coefficients allow the reconstruction of the matrix $ Q $ in the Hessenberg decomposition from the packed data.

See also:
packedMatrix(), Householder module

Definition at line 177 of file HessenbergDecomposition.h.


The documentation for this class was generated from the following file:
Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7