Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

{type}TriDiagMat



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/dtrdgmat.h>     // DoubleTriDiagMat
#include <rw/ftrdgmat.h>     // FloatTriDiagMat
#include <rw/ctrdgmat.h>     // DComplexTriDiagMat

DoubleTriDiagMat A;

Description

The classes {TYPE}TriDiagMat encapsulate tridiagonal matrices. A tridiagonal matrix is nonzero only on the diagonal, the subdiagonal, and the superdiagonal. It is a banded matrix with upper and lower bandwidth equal to 1.

Example

#include <rw/ftrdgmat.h>

main()
{
    FloatTriDiagMat T(5,5);
    T.diagonal() = 1;
    T.leadingSubmatrix(3).zero();
}

Storage Scheme

A tridiagonal matrix is nonzero only along the main diagonal, the subdiagonal, and the superdiagonal:

The matrix is stored in an analogous way to the banded matrix:

[ XXX A11 A21 A21 A22 A32 A23 A33 A43 A34 A44 A54 ... Ann XXX ]

The mapping between the array and storage vector is as follows:

Public Constructors

DoubleTriDiagMat();
FloatTriDiagMat();
DComplexTriDiagMat();
DoubleTriDiagMat(const DoubleTriDiagMat& A);
FloatTriDiagMat(const FloatTriDiagMat& A);
DComplexTriDiagMat(const DComplexTriDiagMat& A);
DoubleTriDiagMat(unsigned n, unsigned n);
FloatTriDiagMat(unsigned n, unsigned n);
DComplexTriDiagMat(unsigned n, unsigned n);
DoubleTriDiagMat(const RWMathVec<double>& vd, unsigned n,
unsigned n); FloatTriDiagMat(const RWMathVec<float>& vd, unsigned n,
unsigned n); DComplexTriDiagMat(const RWMathVec<DComplex>& vd, unsigned n,
unsigned n);
DComplexTriDiagMat(const DoubleTriDiagMat& re);
DComplexTriDiagMat(const DoubleTriDiagMat& re,
const DoubleTriDiagMat& im);
DoubleTriDiagMat(const FloatTriDiagMat&);

Public Member Functions

unsigned
FloatTriDiagMat::bandwidth();
unsigned
DoubleTriDiagMat::bandwidth();
unsigned
DComplexTriDiagMat::bandwidth();
ROFloatRef
FloatTriDiagMat::bcref(int i, int j);
RODoubleRef
DoubleTriDiagMat::bcref(int i, int j);
RODComplexRef
DComplexTriDiagMat::bcref(int i, int j);
RWMathVec<float>
FloatTriDiagMat::bcdiagonal(int j=0);
RWMathVec<double>
DoubleTriDiagMat::bcdiagonal(int j=0);
RWMathVec<DComplex>
DComplexTriDiagMat::bcdiagonal(int j=0);
void
FloatTriDiagMat::bcset(int i, int j, float x);
void
DoubleTriDiagMat::bcset(int i, int j, double x);
void
DComplexTriDiagMat::bcset(int i, int j, DComplex);
float
FloatTriDiagMat::bcval(int i, int j);
double
DoubleTriDiagMat::bcval(int i, int j);
DComplex 
DComplexTriDiagMat::bcval(int i, int j);
unsigned
FloatTriDiagMat::binaryStoreSize();
unsigned
DoubleTriDiagMat::binaryStoreSize();
unsigned
DComplexTriDiagMat::binaryStoreSize();
unsigned
FloatTriDiagMat::cols();
unsigned
DoubleTriDiagMat::cols();
unsigned
DComplexTriDiagMat::cols();
FloatTriDiagMat
FloatTriDiagMat::copy();
DoubleTriDiagMat
DoubleTriDiagMat::copy();
DComplexTriDiagMat
DComplexTriDiagMat::copy();
float*
FloatTriDiagMat::data();
double*
DoubleTriDiagMat::data();
DComplex*
DComplexTriDiagMat::data();
RWMathVec<float>
FloatTriDiagMat::dataVec();
RWMathVec<double>
DoubleTriDiagMat::dataVec();
RWMathVec<DComplex>
DComplexTriDiagMat::dataVec();
FloatTriDiagMat
FloatTriDiagMat::deepCopy();
DoubleTriDiagMat
DoubleTriDiagMat::deepCopy();
DComplexTriDiagMat
DComplexTriDiagMat::deepCopy();
void
FloatTriDiagMat::deepenShallowCopy();
void
DoubleTriDiagMat::deepenShallowCopy();
void
DComplexTriDiagMat::deepenShallowCopy();
RWMathVec<float>
FloatTriDiagMat::diagonal(int j=0);
RWMathVec<double>
DoubleTriDiagMat::diagonal(int j=0);
RWMathVec<DComplex>
DComplexTriDiagMat::diagonal(int j=0);
unsigned
FloatTriDiagMat::halfBandwidth();
unsigned
DoubleTriDiagMat::halfBandwidth();
unsigned
DComplexTriDiagMat::halfBandwidth();
FloatTriDiagMat
FloatTriDiagMat::leadingSubmatrix(int k);
DoubleTriDiagMat
DoubleTriDiagMat::leadingSubmatrix(int k);
DComplexTriDiagMat
DComplexTriDiagMat::leadingSubmatrix(int k);
unsigned
FloatTriDiagMat::lowerBandwidth();
unsigned
DoubleTriDiagMat::lowerBandwidth();
unsigned
DComplexTriDiagMat::lowerBandwidth();
void
FloatTriDiagMat::printOn(ostream&);
void
DoubleTriDiagMat::printOn(ostream&);
void
DComplexTriDiagMat::printOn(ostream&);
ROFloatRef
FloatTriDiagMat::ref(int i, int j);
RODoubleRef
DoubleTriDiagMat::ref(int i, int j);
RODComplexRef
DComplexTriDiagMat::ref(int i, int j);
FloatTriDiagMat 
FloatTriDiagMat::reference(FloatTriDiagMat&);
DoubleTriDiagMat 
DoubleTriDiagMat::reference(DoubleTriDiagMat&);
DComplexTriDiagMat
DComplexTriDiagMat::reference(DComplexTriDiagMat&);
void
DoubleTriDiagMat::resize(unsigned n, unsigned n);
void
FloatTriDiagMat::resize(unsigned n, unsigned n);
void
DComplexTriDiagMat::resize(unsigned n, unsigned n);
void
DoubleTriDiagMat::restoreFrom(RWFile&);
void
FloatTriDiagMat::restoreFrom(RWFile&);
void
DComplexTriDiagMat::restoreFrom(RWFile&);
void
DoubleTriDiagMat::restoreFrom(RWvistream&);
void
FloatTriDiagMat::restoreFrom(RWvistream&);
void
DComplexTriDiagMat::restoreFrom(RWvistream&);
unsigned
FloatTriDiagMat::rows();
unsigned
DoubleTriDiagMat::rows();
unsigned
DComplexTriDiagMat::rows();
void
DoubleTriDiagMat::saveOn(RWFile&);
void
FloatTriDiagMat::saveOn(RWFile&);
void
DComplexTriDiagMat::saveOn(RWFile&);
void
DoubleTriDiagMat::saveOn(RWvostream&);
void
FloatTriDiagMat::saveOn(RWvostream&);
void
DComplexTriDiagMat::saveOn(RWvostream&);
void
FloatTriDiagMat::scanFrom(istream&);
void
DoubleTriDiagMat::scanFrom(istream&);
void
DComplexTriDiagMat::scanFrom(istream&);
void
FloatTriDiagMat::set(int i, int j, float x);
void
DoubleTriDiagMat::set(int i, int j, double x);
void
DComplexTriDiagMat::set(int i, int j, DComplex x);
unsigned
FloatTriDiagMat::upperBandwidth();
unsigned
DoubleTriDiagMat::upperBandwidth();
unsigned
DComplexTriDiagMat::upperBandwidth();
float
FloatTriDiagMat::val(int i, int j);
double
DoubleTriDiagMat::val(int i, int j);
DComplex
DComplexTriDiagMat::val(int i, int j);
FloatTriDiagMat
FloatTriDiagMat::zero();
DoubleTriDiagMat
DoubleTriDiagMat::zero();
DComplexTriDiagMat
DComplexTriDiagMat::zero();

Public Member Operators

RODoubleRefFloat   TriDiagMat::operator()(int i, int j);
double             FloatTriDiagMat::operator()
(int i, int j) const; ROFloatRef DoubleTriDiagMat::operator()(int i, int j); float DoubleTriDiagMat::operator()(int i,
int j) const; RODComplexRef DComplexTriDiagMat::operator()(int i,
int j); DComplex DComplexTriDiagMat::operator()(int i,
int j) const;
DoubleTriDiagMat&    operator=(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator=(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator=(const DComplexTriDiagMat& A);
DoubleTriDiagMat&    operator==(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator==(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator==(const DComplexTriDiagMat& A);
DoubleTriDiagMat&    operator!=(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator!=(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator!=(const DComplexTriDiagMat& A);
DoubleTriDiagMat&    operator*=(double x);
FloatTriDiagMat&     operator*=(float x);
DComplexTriDiagMat&  operator*=(DComplex x);
DoubleTriDiagMat&    operator/=(double x);
FloatTriDiagMat&     operator/=(float x);
DComplexTriDiagMat&  operator/=(DComplex x);
DoubleTriDiagMat&    operator+=(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator+=(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator+=(const DComplexTriDiagMat& A);
DoubleTriDiagMat&    operator-=(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator-=(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator-=(const DComplexTriDiagMat& A);
DoubleTriDiagMat&    operator*=(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator*=(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator*=(const DComplexTriDiagMat& A);
DoubleTriDiagMat&    operator/=(const DoubleTriDiagMat& A);
FloatTriDiagMat&     operator/=(const FloatTriDiagMat& A);
DComplexTriDiagMat&  operator/=(const DComplexTriDiagMat& A);

Global Operators

DoubleTriDiagMat    operator+(const DoubleTriDiagMat&);
FloatTriDiagMat     operator+(const FloatTriDiagMat&);
DComplexTriDiagMat  operator+(const DComplexTriDiagMat&);
DoubleTriDiagMat    operator-(const DoubleTriDiagMat&);
FloatTriDiagMat     operator-(const FloatTriDiagMat&);
DComplexTriDiagMat  operator-(const DComplexTriDiagMat&);
DoubleTriDiagMat    operator+(const DoubleTriDiagMat&, 
const DoubleTriDiagMat&); FloatTriDiagMat operator+(const FloatTriDiagMat&,
const FloatTriDiagMat&); DComplexTriDiagMat operator+(const DComplexTriDiagMat&,
const DComplexTriDiagMat&); DoubleTriDiagMat operator-(const DoubleTriDiagMat&,
const DoubleTriDiagMat&); FloatTriDiagMat operator-(const FloatTriDiagMat&,
const FloatTriDiagMat&); DComplexTriDiagMat operator-(const DComplexTriDiagMat&,
const DComplexTriDiagMat&); DoubleTriDiagMat operator*(const DoubleTriDiagMat&,
const DoubleTriDiagMat&); FloatTriDiagMat operator*(const FloatTriDiagMat&,
const FloatTriDiagMat&); DComplexTriDiagMat operator*(const DComplexTriDiagMat&,
const DComplexTriDiagMat&); DoubleTriDiagMat operator/(const DoubleTriDiagMat&,
const DoubleTriDiagMat&); FloatTriDiagMat operator/(const FloatTriDiagMat&,
const FloatTriDiagMat&); DComplexTriDiagMat operator/(const DComplexTriDiagMat&,
const DComplexTriDiagMat&);
DoubleTriDiagMat    operator*(double,const DoubleTriDiagMat&);
DoubleTriDiagMat    operator*(const DoubleTriDiagMat&,double);
FloatTriDiagMat     operator*(float,const FloatTriDiagMat&);
FloatTriDiagMat     operator*(const FloatTriDiagMat&,float);
DComplexTriDiagMat  operator*(DComplex, 
const DComplexTriDiagMat&); DComplexTriDiagMat operator*(const DComplexTriDiagMat&,
DComplex); DoubleTriDiagMat operator/(const DoubleTriDiagMat&,double); FloatTriDiagMat operator/(const FloatTriDiagMat&,float); DComplexTriDiagMat operator/(const DComplexTriDiagMat&,
DComplex);
ostream&    operator<<(ostream& s, const DoubleTriDiagMat&);
ostream&    operator<<(ostream& s, const FloatTriDiagMat&);
ostream&    operator<<(ostream& s, const DComplexTriDiagMat&);
istream&    operator>>(istream& s, const DoubleTriDiagMat&);
istream&    operator>>(istream& s, const FloatTriDiagMat&);
istream&    operator>>(istream& s, const DComplexTriDiagMat&);

Global Functions

DoubleTriDiagMat
abs(const DoubleTriDiagMat&);
FloatTriDiagMat
abs(const FloatTriDiagMat&);
DoubleTriDiagMat
abs(const DComplexTriDiagMat&);
DoubleTriDiagMat
arg(const DComplexTriDiagMat& A);
DComplexTriDiagMat
conj(const DComplexTriDiagMat& A);
DoubleTriDiagMat
imag(const DComplexTriDiagMat& A);
double
maxValue(const DoubleTriDiagMat&);
float
maxValue(const FloatTriDiagMat&);
double
minValue(const DoubleTriDiagMat&);
float
minValue(const FloatTriDiagMat&);
DoubleTriDiagMat
norm(const DComplexTriDiagMat& A);
RWMathVec<double>
product(const DoubleTriDiagMat& A, 
const RWMathVec<double>& x); RWMathVec<float> product(const FloatTriDiagMat& A,
const RWMathVec<float>& x); RWMathVec<DComplex> product(const DComplexTriDiagMat& A, const RWMathVec<DComplex>& x);
RWMathVec<double>
product(const RWMathVec<double>& x, 
const DoubleTriDiagMat& A); RWMathVec<float> product(const RWMathVec<float>& x,
const FloatTriDiagMat& A); RWMathVec<DComplex> product(const RWMathVec<DComplex>& x, const DComplexTriDiagMat& A);
DoubleTriDiagMat
real(const DComplexTriDiagMat& A);
FloatTriDiagMat
toFloat(const DoubleTriDiagMat&);
DoubleTriDiagMat
toTriDiagMat(const RWGenMat<double>&);
FloatTriDiagMat
toTriDiagMat(const RWGenMat<float>&);
DComplexTriDiagMat
toTriDiagMat(const RWGenMat<DComplex>&);
DoubleTriDiagMat
transpose(const DoubleTriDiagMat&);
FloatTriDiagMat
transpose(const FloatTriDiagMat&);
DComplexTriDiagMat
transpose(const DComplexTriDiagMat&);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.