Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Tridiagonalization< _MatrixType > Class Template Reference

Trigiagonal decomposition of a selfadjoint matrix. More...

Public Types

enum  {
  Size,
  SizeMinusOne,
  PacketSize
}
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 MatrixType & packedMatrix (void) const
const SubDiagonalReturnType subDiagonal (void) const
 Tridiagonalization (int size=Size==Dynamic?2:Size)
 Tridiagonalization (const MatrixType &matrix)

Static Public Member Functions

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

Protected Attributes

CoeffVectorType m_hCoeffs
MatrixType m_matrix

Detailed Description

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

Trigiagonal decomposition of a selfadjoint matrix.

Warning
This is not considered to be part of the stable public API yet. Changes may happen in future releases. See Experimental parts of Eigen
Parameters
MatrixTypethe 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()

Constructor & Destructor Documentation

Tridiagonalization ( int  size = Size==Dynamic ? 2 : Size)
inline

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

Member Function Documentation

void compute ( const MatrixType &  matrix)
inline

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

This method allows to re-use the allocated data.

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

Performs a full decomposition in place

const Tridiagonalization< MatrixType >::DiagonalReturnType diagonal ( void  ) const
Returns
an expression of the diagonal vector
CoeffVectorType householderCoefficients ( void  ) const
inline
Returns
the householder coefficients allowing to reconstruct the matrix Q from the packed data.
See Also
packedMatrix()
Tridiagonalization< MatrixType >::MatrixType matrixQ ( void  ) const

reconstructs and returns the matrix Q

Tridiagonalization< MatrixType >::MatrixType matrixT ( void  ) const

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.

const 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.

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

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