>
>#include <rw/dtd.h> // DoubleSymDenseTriDiagDecomp #include <rw/ftd.h> // FloatSymDenseTriDiagDecomp #include <rw/ctd.h> // DComplexHermDenseTriDiagDecomp DoubleSymDenseTriDiagDecomp QTQ(A); // A is a DoubleSymMat
The classes {TYPE}SymDenseTriDiagDecomp encapsulate the symmetric tri-
diagonal decomposition of a dense symmetric matrix A, where:
and Q is orthogonal and T is real tridiagonal symmetric. Class DComplexHermDenseTriDiagDecomp does the same for Hermitians. These classes are used internally by the symmetric eigenvalue classes.
>#include <rw/dsymmat.h> #include <rw/dtd.h> main() { DoubleSymMat A; cin >> A; DoubleSymDenseTriDiagDecomp decomp(A); cout << "T's diagonal is" << decomp.diagonal() << endl; cout << "T's off diagonal is " << decomp.offDiagonal() << endl; }>
FloatSymDenseTriDiagDecomp(const FloatSymMat& A); DoubleSymDenseTriDiagDecomp(const DoubleSymMat& A); DComplexHermDenseTriDiagDecomp(const DComplexSymMat& A);
Constructs a tridiagonal decomposition of A.
unsigned FloatSymDenseTriDiagDecomp::cols() const; unsigned DoubleSymDenseTriDiagDecomp::cols() const; unsigned DComplexHermDenseTriDiagDecomp::cols() const;
Returns the number of columns in the decomposition.
const RWMathVec<float> FloatSymDenseTriDiagDecomp::diagonal() const; const RWMathVec<double> DoubleSymDenseTriDiagDecomp::diagonal() const; const RWMathVec<double> DComplexHermDenseTriDiagDecomp::diagonal() const;
Returns the diagonal of the symmetric tridiagonal matrix T.
const RWMathVec<float> FloatSymDenseTriDiagDecomp::offDiagonal() const; const RWMathVec<double> DoubleSymDenseTriDiagDecomp::offDiagonal() const; const RWMathVec<double> DComplexHermDenseTriDiagDecomp::offDiagonal() const;
Returns the subdiagonal or superdiagonal of the symmetric tridiagonal matrix T.
unsigned FloatSymDenseTriDiagDecomp::rows() const; unsigned DoubleSymDenseTriDiagDecomp::rows() const; unsigned DComplexHermDenseTriDiagDecomp::rows() const;
Returns the number of rows in the decomposition.
void FloatSymDenseTriDiagDecomp::set
(const RWMathVec<float>& diag,
const RWMathVec<float>& offdiag); void DoubleSymDenseTriDiagDecomp::set
(const RWMathVec<double>& diag,
const RWMathVec<double>& offdiag); void DComplexHermDenseTriDiagDecomp::set
(const RWMathVec<double>&diag, const RWMathVec<double>& offdiag);
Sets the tridiagonal matrix directly.
virtual RWMathVec<float> FloatSymDenseTriDiagDecomp::transform
(const RWMathVec<float>& x); virtual RWMathVec<double> DoubleSymDenseTriDiagDecomp::transform
(const RWMathVec<double>& x); virtual RWMathVec<DComplex> DComplexHermDenseTriDiagDecomp::transform
(const RWMathVec<double>& x); virtual RWGenMat<float> FloatSymDenseTriDiagDecomp::transform
(const RWGenMat<float>& x); virtual RWGenMat<double> DoubleSymDenseTriDiagDecomp::transform
(const RWGenMat<double>& x); virtual RWGenMat<DComplex> DComplexHermDenseTriDiagDecomp::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.