>
>#include <rw/dtd.h> // DoubleSymBandTriDiagDecomp #include <rw/ftd.h> // FloatSymBandTriDiagDecomp #include <rw/ctd.h> // DComplexHermBandTriDiagDecomp DoubleSymBandTriDiagDecomp(A); // A is a DoubleSymMat
The classes {TYPE}SymBandTriDiagDecomp encapsulate a symmetric tridiagonal decomposition of a symmetric banded matrix A:
where Q is orthogonal and T is real tridiagonal symmetric. Class DComplexHermBandTriDiagDecomp does the same for Hermitians. These classes are used internally by the symmetric eigenvalue classes.
>#include <rw/dsbndmat.h> #include <rw/dtd.h> main() { DoubleSymBandMat A; cin >> A; DoubleSymBandTriDiagDecomp decomp(A); cout << "T's diagonal is" << decomp.diagonal() << endl; cout << "T's off diagonal is " << decomp.offDiagonal()>
<< endl; }
FloatSymBandTriDiagDecomp(const FloatSymMat& A,
RWBoolean keepQ=TRUE); DoubleSymBandTriDiagDecomp(const DoubleSymMat& A,
RWBoolean keepQ=TRUE); DComplexHermBandTriDiagDecomp(const DComplexSymMat& A,
RWBoolean keepQ=TRUE);
Constructs a tridiagonal decomposition of A. By setting the optional boolean parameter to FALSE, the data necessary to transform via Q is not stored. This can save substantial storage costs, but an exception is thrown if you attempt to use the member function transform.
unsigned FloatSymBandTriDiagDecomp::cols() const; unsigned DoubleSymBandTriDiagDecomp::cols() const; unsigned DComplexHermBandTriDiagDecomp::cols() const;
Returns the number of columns in the decomposition.
const RWMathVec<float> FloatSymBandTriDiagDecomp::diagonal() const; const RWMathVec<double> DoubleSymBandTriDiagDecomp::diagonal() const; const RWMathVec<double> DComplexHermBandTriDiagDecomp::diagonal() const;
Returns the diagonal of the symmetric tridiagonal matrix T.
const RWMathVec<float>
FloatSymBandTriDiagDecomp::offDiagonal() const; const RWMathVec<double> DoubleSymBandTriDiagDecomp::offDiagonal() const; const RWMathVec<double> DComplexHermBandTriDiagDecomp::offDiagonal() const;
Returns the subdiagonal or superdiagonal of the symmetric tridiagonal matrix T.
unsigned FloatSymBandTriDiagDecomp::rows() const; unsigned DoubleSymBandTriDiagDecomp::rows() const; unsigned DComplexHermBandTriDiagDecomp::rows() const;
Returns the number of rows in the decomposition.
void FloatSymBandTriDiagDecomp::set(const RWMathVec<float>& diag,
const RWMathVec<float>& offdiag); void DoubleSymBandTriDiagDecomp::set(const RWMathVec<double>& diag,
const RWMathVec<double>& offdiag); void DComplexHermBandTriDiagDecomp::set(const RWMathVec<double>& diag,
const RWMathVec<double>& offdiag);
Sets the tridiagonal matrix directly.
virtual RWMathVec<float> FloatSymBandTriDiagDecomp::transform
(const RWMathVec<float>& x); virtual RWMathVec<double> DoubleSymBandTriDiagDecomp::transform
(const RWMathVec<double>& x); virtual RWMathVec<DComplex>DComplexHermBandTriDiagDecomp::transform
(const RWMathVec<double>& x); virtual RWGenMat<float> FloatSymBandTriDiagDecomp::transform
(const RWGenMat<float>& x); virtual RWGenMat<double> DoubleSymBandTriDiagDecomp::transform
(const RWGenMat<double>& x); virtual RWGenMat<DComplex> DComplexHermBandTriDiagDecomp::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.