Tridiagonal decomposition of a selfadjoint matrix. More...
#include <Tridiagonalization.h>
Public Member Functions | |
template<typename InputType > | |
Tridiagonalization & | compute (const EigenBase< InputType > &matrix) |
Computes tridiagonal decomposition of given matrix. More... | |
DiagonalReturnType | diagonal () const |
Returns the diagonal of the tridiagonal matrix T in the decomposition. More... | |
CoeffVectorType | householderCoefficients () const |
Returns the Householder coefficients. More... | |
HouseholderSequenceType | matrixQ () const |
Returns the unitary matrix Q in the decomposition. More... | |
MatrixTReturnType | matrixT () const |
Returns an expression of the tridiagonal matrix T in the decomposition. More... | |
const MatrixType & | packedMatrix () const |
Returns the internal representation of the decomposition. More... | |
SubDiagonalReturnType | subDiagonal () const |
Returns the subdiagonal of the tridiagonal matrix T in the decomposition. More... | |
template<typename InputType > | |
Tridiagonalization (const EigenBase< InputType > &matrix) | |
Constructor; computes tridiagonal decomposition of given matrix. More... | |
Tridiagonalization (Index size=Size==Dynamic ? 2 :Size) | |
Default constructor. More... | |
Protected Attributes | |
CoeffVectorType | m_hCoeffs |
bool | m_isInitialized |
MatrixType | m_matrix |
Tridiagonal decomposition of a selfadjoint matrix.
\eigenvalues_module
_MatrixType | the type of the matrix of which we are computing the tridiagonal decomposition; this is expected to be an instantiation of the Matrix class template. |
This class performs a tridiagonal decomposition of a selfadjoint matrix such that: where is unitary and a real symmetric tridiagonal matrix.
A tridiagonal matrix is a matrix which has nonzero elements only on the main diagonal and the first diagonal below and above it. The Hessenberg decomposition of a selfadjoint matrix is in fact a tridiagonal decomposition. This class is used in SelfAdjointEigenSolver to compute the eigenvalues and eigenvectors of a selfadjoint matrix.
Call the function compute() to compute the tridiagonal decomposition of a given matrix. Alternatively, you can use the Tridiagonalization(const MatrixType&) constructor which computes the tridiagonal Schur decomposition at construction time. Once the decomposition is computed, you can use the matrixQ() and matrixT() functions to retrieve the matrices Q and T in the decomposition.
The documentation of Tridiagonalization(const MatrixType&) contains an example of the typical use of this class.
Definition at line 64 of file Tridiagonalization.h.
typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> Eigen::Tridiagonalization< _MatrixType >::CoeffVectorType |
Definition at line 83 of file Tridiagonalization.h.
typedef internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::add_const_on_value_type<typename Diagonal<const MatrixType>::RealReturnType>::type, const Diagonal<const MatrixType> >::type Eigen::Tridiagonalization< _MatrixType >::DiagonalReturnType |
Definition at line 92 of file Tridiagonalization.h.
typedef internal::plain_col_type<MatrixType, RealScalar>::type Eigen::Tridiagonalization< _MatrixType >::DiagonalType |
Definition at line 84 of file Tridiagonalization.h.
typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename CoeffVectorType::ConjugateReturnType>::type> Eigen::Tridiagonalization< _MatrixType >::HouseholderSequenceType |
Return type of matrixQ()
Definition at line 100 of file Tridiagonalization.h.
typedef Eigen::Index Eigen::Tridiagonalization< _MatrixType >::Index |
Definition at line 73 of file Tridiagonalization.h.
typedef internal::TridiagonalizationMatrixTReturnType<MatrixTypeRealView> Eigen::Tridiagonalization< _MatrixType >::MatrixTReturnType |
Definition at line 87 of file Tridiagonalization.h.
typedef _MatrixType Eigen::Tridiagonalization< _MatrixType >::MatrixType |
Synonym for the template parameter _MatrixType
.
Definition at line 69 of file Tridiagonalization.h.
typedef internal::remove_all<typename MatrixType::RealReturnType>::type Eigen::Tridiagonalization< _MatrixType >::MatrixTypeRealView |
Definition at line 86 of file Tridiagonalization.h.
typedef NumTraits<Scalar>::Real Eigen::Tridiagonalization< _MatrixType >::RealScalar |
Definition at line 72 of file Tridiagonalization.h.
typedef MatrixType::Scalar Eigen::Tridiagonalization< _MatrixType >::Scalar |
Definition at line 71 of file Tridiagonalization.h.
typedef internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::add_const_on_value_type<typename Diagonal<const MatrixType, -1>::RealReturnType>::type, const Diagonal<const MatrixType, -1> >::type Eigen::Tridiagonalization< _MatrixType >::SubDiagonalReturnType |
Definition at line 97 of file Tridiagonalization.h.
typedef Matrix<RealScalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> Eigen::Tridiagonalization< _MatrixType >::SubDiagonalType |
Definition at line 85 of file Tridiagonalization.h.
anonymous enum |
Enumerator | |
---|---|
Size | |
SizeMinusOne | |
Options | |
MaxSize | |
MaxSizeMinusOne |
Definition at line 75 of file Tridiagonalization.h.
|
inlineexplicit |
Default constructor.
[in] | size | Positive integer, size of the matrix whose tridiagonal 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.
Definition at line 114 of file Tridiagonalization.h.
|
inlineexplicit |
Constructor; computes tridiagonal decomposition of given matrix.
[in] | matrix | Selfadjoint matrix whose tridiagonal decomposition is to be computed. |
This constructor calls compute() to compute the tridiagonal decomposition.
Example:
Output:
Definition at line 131 of file Tridiagonalization.h.
|
inline |
Computes tridiagonal decomposition of given matrix.
[in] | matrix | Selfadjoint matrix whose tridiagonal decomposition is to be computed. |
*this
The tridiagonal decomposition is computed by bringing the columns of the matrix successively in the required form using Householder reflections. The cost is flops, where denotes the size of the given matrix.
This method reuses of the allocated data in the Tridiagonalization object, if the size of the matrix does not change.
Example:
Output:
Definition at line 158 of file Tridiagonalization.h.
Tridiagonalization< MatrixType >::DiagonalReturnType Eigen::Tridiagonalization< MatrixType >::diagonal |
Returns the diagonal of the tridiagonal matrix T in the decomposition.
Example:
Output:
Definition at line 308 of file Tridiagonalization.h.
|
inline |
Returns the Householder coefficients.
The Householder coefficients allow the reconstruction of the matrix in the tridiagonal decomposition from the packed data.
Example:
Output:
Definition at line 183 of file Tridiagonalization.h.
|
inline |
Returns the unitary matrix Q in the decomposition.
This function returns a light-weight object of template class HouseholderSequence. You can either apply it directly to a matrix or you can convert it to a matrix of type MatrixType.
Definition at line 241 of file Tridiagonalization.h.
|
inline |
Returns an expression of the tridiagonal matrix T in the decomposition.
Currently, this function can be used to extract the matrix T from internal data and copy it to a dense matrix object. In most cases, it may be sufficient to directly use the packed matrix or the vector expressions returned by diagonal() and subDiagonal() instead of creating a new dense copy matrix with this function.
Definition at line 266 of file Tridiagonalization.h.
|
inline |
Returns the internal representation of the decomposition.
The returned matrix contains the following information:
See LAPACK for further details on this packed storage.
Example:
Output:
Definition at line 220 of file Tridiagonalization.h.
Tridiagonalization< MatrixType >::SubDiagonalReturnType Eigen::Tridiagonalization< MatrixType >::subDiagonal |
Returns the subdiagonal of the tridiagonal matrix T in the decomposition.
Definition at line 316 of file Tridiagonalization.h.
|
protected |
Definition at line 302 of file Tridiagonalization.h.
|
protected |
Definition at line 303 of file Tridiagonalization.h.
|
protected |
Definition at line 301 of file Tridiagonalization.h.