rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWHessenbergDecomp< TypeT > Class Template Reference
[Nonsymmetric Eigenvalue Decomposition]

Encapsulates a Hessenberg decomposition as well as an optional balance transformation. More...

#include <rw/lapack/hess.h>

List of all members.

Public Member Functions

 RWHessenbergDecomp ()
 RWHessenbergDecomp (const RWGenMat< TypeT > &A, bool permute=true, bool scale=true)
 RWHessenbergDecomp (const RWBalanceDecomp< TypeT > &)
void factor (const RWGenMat< TypeT > &A, bool permute=true, bool scale=true)
void factor (const RWBalanceDecomp< TypeT > &)
unsigned cols () const
RWGenMat< TypeT > B () const
RWBalanceTransform< TypeT > balanceTransform () const
RWGenMat< TypeT > Q () const
RWMathVec< TypeT > Bx (const RWMathVec< TypeT > &x) const
RWMathVec< TypeT > BInvTx (const RWMathVec< TypeT > &x) const
RWMathVec< TypeT > Qx (const RWMathVec< TypeT > &x) const
RWMathVec< TypeT > QTx (const RWMathVec< TypeT > &) const
RWGenMat< TypeT > BX (const RWGenMat< TypeT > &X) const
RWGenMat< TypeT > BInvTX (const RWGenMat< TypeT > &X) const
RWGenMat< TypeT > QX (const RWGenMat< TypeT > &X) const
RWGenMat< TypeT > QTX (const RWGenMat< TypeT > &X) const

Detailed Description

template<class TypeT>
class RWHessenbergDecomp< TypeT >

A Hessenberg decomposition uses orthogonal transformations to reduce a matrix A to a matrix H that is 0 below the first subdiagonal. Computation of the Hessenberg decomposition is the first step in the QR method for computing eigenvalues of a nonsymmetric matrix.

The class RWHessenbergDecomp<T> encapsulates a Hessenberg decomposition as well as an optional balance transformation. The decomposition of a matrix A is:

$A = BQHQ'B^{-1}$

where Q is orthogonal, H is 0 below the first subdiagonal, and B is a balance transformation. See the entry RWBalanceTransform<T> .

Synopsis

 #include <rw/lapack/hess.h>
 
 RWHessenbergDecomp<double> hess(A);   // A is a
                                          // RWGenMat<double>

Examples

 #include <iostream>
 #include <rw/lapack/hess.h>
 
 int main()
 {
     RWGenMat<double> A;
     std::cin >> A;
     RWHessenbergDecomp<double> hess(A);
     std::cout << "Input matrix: " << A << std::endl;
     std::cout << "B: " << hess.B() << std::endl;
     std::cout << "Q: " << hess.Q() << std::endl;
     std::cout << "H: " << hess.H() << std::endl;
     return 0;
 }

Constructor & Destructor Documentation

template<class TypeT>
RWHessenbergDecomp< TypeT >::RWHessenbergDecomp (  ) 

Default constructor. Builds a decomposition of size 0 x 0.

template<class TypeT>
RWHessenbergDecomp< TypeT >::RWHessenbergDecomp ( const RWGenMat< TypeT > &  A,
bool  permute = true,
bool  scale = true 
)

Constructs the Hessenberg decomposition of the matrix A. The boolean parameters determine whether or not the permutation or scaling parts of the balance transformation are applied prior to forming the Hessenberg decomposition.

template<class TypeT>
RWHessenbergDecomp< TypeT >::RWHessenbergDecomp ( const RWBalanceDecomp< TypeT > &   ) 

Builds a Hessenberg decomposition of the matrix represented by the balance decomposition.


Member Function Documentation

template<class TypeT>
RWGenMat<TypeT> RWHessenbergDecomp< TypeT >::B (  )  const

Computes an explicit representation of the balance transformation.

template<class TypeT>
RWBalanceTransform<TypeT> RWHessenbergDecomp< TypeT >::balanceTransform (  )  const [inline]

Returns an object which represents the balance transformation.

template<class TypeT>
RWGenMat<TypeT> RWHessenbergDecomp< TypeT >::BInvTX ( const RWGenMat< TypeT > &  X  )  const

Computes the (conjugate) transpose inverse of the balance transformation B and the matrix X.

template<class TypeT>
RWMathVec<TypeT> RWHessenbergDecomp< TypeT >::BInvTx ( const RWMathVec< TypeT > &  x  )  const

Computes the (conjugate) transpose inverse of the balance transformation B and the vector x.

template<class TypeT>
RWGenMat<TypeT> RWHessenbergDecomp< TypeT >::BX ( const RWGenMat< TypeT > &  X  )  const

Computes the inner product of the balance transformation B and the matrix X.

template<class TypeT>
RWMathVec<TypeT> RWHessenbergDecomp< TypeT >::Bx ( const RWMathVec< TypeT > &  x  )  const

Computes the inner product of the balance transformation B and the vector x.

template<class TypeT>
unsigned RWHessenbergDecomp< TypeT >::cols (  )  const [inline]

Returns the number of columns in the matrix that the decomposition represents.

template<class TypeT>
void RWHessenbergDecomp< TypeT >::factor ( const RWBalanceDecomp< TypeT > &   ) 

Replaces the current decomposition with the Hessenberg decomposition of the matrix represented by the balance decomposition.

template<class TypeT>
void RWHessenbergDecomp< TypeT >::factor ( const RWGenMat< TypeT > &  A,
bool  permute = true,
bool  scale = true 
)

Replaces the current decomposition with the Hessenberg decomposition of the matrix A. The boolean parameters determine whether or not the permutation or scaling parts of the balance transformation are applied prior to forming the Hessenberg decomposition.

template<class TypeT>
RWGenMat<TypeT> RWHessenbergDecomp< TypeT >::Q (  )  const

Computes an explicit representation of the orthogonal matrix Q.

template<class TypeT>
RWGenMat<TypeT> RWHessenbergDecomp< TypeT >::QTX ( const RWGenMat< TypeT > &  X  )  const

Computes the (conjugate) transpose of the orthogonal matrix Q and the matrix X.

template<class TypeT>
RWMathVec<TypeT> RWHessenbergDecomp< TypeT >::QTx ( const RWMathVec< TypeT > &   )  const

Computes the (conjugate) transpose of the orthogonal matrix Q and the vector x.

template<class TypeT>
RWGenMat<TypeT> RWHessenbergDecomp< TypeT >::QX ( const RWGenMat< TypeT > &  X  )  const

Computes the inner product of the orthogonal matrix Q and the matrix X.

template<class TypeT>
RWMathVec<TypeT> RWHessenbergDecomp< TypeT >::Qx ( const RWMathVec< TypeT > &  x  )  const

Computes the inner product of the orthogonal matrix Q and the vector x.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.