Tridiagonalization< _MatrixType > Class Template Reference

Trigiagonal decomposition of a selfadjoint matrix. More...

#include <Tridiagonalization.h>

List of all members.

Public Types

enum  { Size = MatrixType::RowsAtCompileTime, SizeMinusOne, PacketSize = ei_packet_traits<Scalar>::size }
typedef Matrix< Scalar,
SizeMinusOne, 1 > 
CoeffVectorType
typedef NestByValue
< DiagonalCoeffs< MatrixType >
>::RealReturnType 
DiagonalReturnType
typedef Matrix< RealScalar,
Size, 1 > 
DiagonalType
typedef _MatrixType MatrixType
typedef ei_packet_traits
< Scalar >::type 
Packet
typedef NumTraits< Scalar >::Real RealScalar
typedef MatrixType::Scalar Scalar
typedef NestByValue
< DiagonalCoeffs< NestByValue
< Block< MatrixType,
SizeMinusOne, SizeMinusOne >
> > >::RealReturnType 
SubDiagonalReturnType
typedef Matrix< RealScalar,
SizeMinusOne, 1 > 
SubDiagonalType

Public Member Functions

void compute (const MatrixType &matrix)
const DiagonalReturnType diagonal (void) const
CoeffVectorType householderCoefficients (void) const
MatrixType matrixQ (void) const
MatrixType matrixT (void) const
const MatrixTypepackedMatrix (void) const
const SubDiagonalReturnType subDiagonal (void) const
 Tridiagonalization (const MatrixType &matrix)
 Tridiagonalization (int size=Size==Dynamic?2:Size)

Static Public Member Functions

static void decomposeInPlace (MatrixType &mat, DiagonalType &diag, SubDiagonalType &subdiag, bool extractQ=true)

Protected Attributes

CoeffVectorType m_hCoeffs
MatrixType m_matrix

Static Private Member Functions

static void _compute (MatrixType &matA, CoeffVectorType &hCoeffs)
static void _decomposeInPlace3x3 (MatrixType &mat, DiagonalType &diag, SubDiagonalType &subdiag, bool extractQ=true)

Detailed Description

template<typename _MatrixType>
class Tridiagonalization< _MatrixType >

Trigiagonal decomposition of a selfadjoint matrix.

Parameters:
MatrixType the type of the matrix of which we are performing the tridiagonalization

This class performs a tridiagonal decomposition of a selfadjoint matrix $ A $ such that: $ A = Q T Q^* $ where $ Q $ is unitary and $ T $ a real symmetric tridiagonal matrix.

See also:
MatrixBase::tridiagonalize()

Definition at line 42 of file Tridiagonalization.h.


Member Typedef Documentation

template<typename _MatrixType >
typedef Matrix<Scalar, SizeMinusOne, 1> Tridiagonalization< _MatrixType >::CoeffVectorType

Definition at line 59 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef NestByValue<DiagonalCoeffs<MatrixType> >::RealReturnType Tridiagonalization< _MatrixType >::DiagonalReturnType

Definition at line 63 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef Matrix<RealScalar, Size, 1> Tridiagonalization< _MatrixType >::DiagonalType

Definition at line 60 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef _MatrixType Tridiagonalization< _MatrixType >::MatrixType

Definition at line 46 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef ei_packet_traits<Scalar>::type Tridiagonalization< _MatrixType >::Packet

Definition at line 49 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef NumTraits<Scalar>::Real Tridiagonalization< _MatrixType >::RealScalar

Definition at line 48 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef MatrixType::Scalar Tridiagonalization< _MatrixType >::Scalar

Definition at line 47 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef NestByValue<DiagonalCoeffs< NestByValue<Block<MatrixType,SizeMinusOne,SizeMinusOne> > > >::RealReturnType Tridiagonalization< _MatrixType >::SubDiagonalReturnType

Definition at line 66 of file Tridiagonalization.h.

template<typename _MatrixType >
typedef Matrix<RealScalar, SizeMinusOne, 1> Tridiagonalization< _MatrixType >::SubDiagonalType

Definition at line 61 of file Tridiagonalization.h.


Member Enumeration Documentation

template<typename _MatrixType >
anonymous enum
Enumerator:
Size 
SizeMinusOne 
PacketSize 

Definition at line 51 of file Tridiagonalization.h.


Constructor & Destructor Documentation

template<typename _MatrixType >
Tridiagonalization< _MatrixType >::Tridiagonalization ( int  size = Size==Dynamic ? 2 : Size  )  [inline]

This constructor initializes a Tridiagonalization object for further use with Tridiagonalization::compute()

Definition at line 71 of file Tridiagonalization.h.

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

Definition at line 75 of file Tridiagonalization.h.


Member Function Documentation

template<typename MatrixType >
void Tridiagonalization< MatrixType >::_compute ( MatrixType matA,
CoeffVectorType hCoeffs 
) [inline, static, private]

Definition at line 191 of file Tridiagonalization.h.

template<typename MatrixType >
void Tridiagonalization< MatrixType >::_decomposeInPlace3x3 ( MatrixType mat,
DiagonalType diag,
SubDiagonalType subdiag,
bool  extractQ = true 
) [inline, static, private]

Definition at line 390 of file Tridiagonalization.h.

template<typename _MatrixType >
void Tridiagonalization< _MatrixType >::compute ( const MatrixType matrix  )  [inline]

Computes or re-compute the tridiagonalization for the matrix matrix.

This method allows to re-use the allocated data.

Definition at line 86 of file Tridiagonalization.h.

template<typename MatrixType >
void Tridiagonalization< MatrixType >::decomposeInPlace ( MatrixType mat,
DiagonalType diag,
SubDiagonalType subdiag,
bool  extractQ = true 
) [inline, static]

Performs a full decomposition in place

Definition at line 367 of file Tridiagonalization.h.

template<typename MatrixType >
const Tridiagonalization< MatrixType >::DiagonalReturnType Tridiagonalization< MatrixType >::diagonal ( void   )  const [inline]
Returns:
an expression of the diagonal vector

Definition at line 139 of file Tridiagonalization.h.

template<typename _MatrixType >
CoeffVectorType Tridiagonalization< _MatrixType >::householderCoefficients ( void   )  const [inline]
Returns:
the householder coefficients allowing to reconstruct the matrix Q from the packed data.
See also:
packedMatrix()

Definition at line 98 of file Tridiagonalization.h.

template<typename MatrixType >
Tridiagonalization< MatrixType >::MatrixType Tridiagonalization< MatrixType >::matrixQ ( void   )  const [inline]

reconstructs and returns the matrix Q

Definition at line 347 of file Tridiagonalization.h.

template<typename MatrixType >
Tridiagonalization< MatrixType >::MatrixType Tridiagonalization< MatrixType >::matrixT ( void   )  const [inline]

constructs and returns the tridiagonal matrix T. Note that the matrix T is equivalent to the diagonal and sub-diagonal of the packed matrix. Therefore, it might be often sufficient to directly use the packed matrix, or the vector expressions returned by diagonal() and subDiagonal() instead of creating a new matrix.

Definition at line 161 of file Tridiagonalization.h.

template<typename _MatrixType >
const MatrixType& Tridiagonalization< _MatrixType >::packedMatrix ( void   )  const [inline]
Returns:
the internal result of the decomposition.

The returned matrix contains the following information:

  • the strict upper part is equal to the input matrix A
  • the diagonal and lower sub-diagonal represent the tridiagonal symmetric matrix (real).
  • the rest of the lower part contains the Householder vectors that, combined with Householder coefficients returned by householderCoefficients(), allows to reconstruct the matrix Q as follow: Q = H_{N-1} ... H_1 H_0 where the matrices H are the Householder transformations: H_i = (I - h_i * v_i * v_i') where h_i == householderCoefficients()[i] and v_i is a Householder vector: v_i = [ 0, ..., 0, 1, M(i+2,i), ..., M(N-1,i) ]

See LAPACK for further details on this packed storage.

Definition at line 116 of file Tridiagonalization.h.

template<typename MatrixType >
const Tridiagonalization< MatrixType >::SubDiagonalReturnType Tridiagonalization< MatrixType >::subDiagonal ( void   )  const [inline]
Returns:
an expression of the sub-diagonal vector

Definition at line 147 of file Tridiagonalization.h.


Member Data Documentation

template<typename _MatrixType >
CoeffVectorType Tridiagonalization< _MatrixType >::m_hCoeffs [protected]

Definition at line 133 of file Tridiagonalization.h.

template<typename _MatrixType >
MatrixType Tridiagonalization< _MatrixType >::m_matrix [protected]

Definition at line 132 of file Tridiagonalization.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:35 2013