>
>#include <rw/dtd.h> // DoubleSymTriDiagDecomp #include <rw/ftd.h> // FloatSymTriDiagDecomp #include <rw/ctd.h> // DComplexHermTriDiagDecomp
The classes {TYPE}SymTriDiagDecomp encapsulates the tridiagonal decomposition of a symmetric matrix A:
where Q is orthogonal and T is tridiagonal and real, even in the complex case. Class DComplexHermTriDiagDecomp does the same for Hermitians. This decomposition is often done as a precursor to computing eigenvalues, since the eigenvalues of T and A are the same, and those of T are easier to compute. Class DComplexHermTriDiagDecomp follows the These classes are used internally by the symmetric eigenvalue classes.
The classes {TYPE}SymTriDiagDecomp and DComplexHermTriDiagDecomp are abstract base classes. Subclasses must implement the pure virtual function decompose. This separates the implementation of the storage of Q from the interface, so that band and dense decompositions can use different storage techniques. LAPACK.h++ provides the derived classes {TYPE}SymDenseTriDiagDecomp, {TYPE}SymBandTriDiagDecomp, and their Hermitian counterparts.
>See specific subclasses for examples.
>unsigned FloatSymTriDiagDecomp::cols() const; unsigned DoubleSymTriDiagDecomp::cols() const; unsigned DComplexHermTriDiagDecomp::cols() const;
Returns the number of columns in the decomposition.
const RWMathVec<float> FloatSymTriDiagDecomp::diagonal() const; const RWMathVec<double> DoubleSymTriDiagDecomp::diagonal() const; const RWMathVec<double> DComplexHermTriDiagDecomp::diagonal() const;
Returns the diagonal of the symmetric tridiagonal matrix T.
const RWMathVec<float> FloatSymTriDiagDecomp::offDiagonal() const; const RWMathVec<double> DoubleSymTriDiagDecomp::offDiagonal() const; const RWMathVec<double> DComplexHermTriDiagDecomp::offDiagonal() const;
Returns the subdiagonal or superdiagonal of the symmetric tridiagonal matrix T.
unsigned FloatSymTriDiagDecomp::rows() const; unsigned DoubleSymTriDiagDecomp::rows() const; unsigned DComplexHermTriDiagDecomp::rows() const;
Returns the number of rows in the decomposition.
void FloatSymTriDiagDecomp::set(const RWMathVec<float>& diag,
const RWMathVec<float>& offdiag); void DoubleSymTriDiagDecomp::set(const RWMathVec<double>& diag,
const RWMathVec<double>& offdiag); void DComplexHermTriDiagDecomp::set(const RWMathVec<double>& diag,
const RWMathVec<double>& offdiag);
Sets the tridiagonal matrix directly.
virtual RWMathVec<float> FloatSymTriDiagDecomp::transform
(const RWMathVec<float>& x); virtual RWMathVec<double> DoubleSymTriDiagDecomp::transform
(const RWMathVec<double>& x); virtual RWMathVec<DComplex> DComplexHermTriDiagDecomp::transform
(const RWMathVec<double>& x); virtual RWGenMat<float> FloatSymTriDiagDecomp::transform
(const RWGenMat<float>& x); virtual RWGenMat<double> DoubleSymTriDiagDecomp::transform
(const RWGenMat<double>& x); virtual RWGenMat<DComplex> DComplexHermTriDiagDecomp::transform
(const RWGenMat<double>& x);
Transforms the vector from tridiagonal decomposition space back to the original matrix space. This amounts to multiplying it by the matrix Q.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.