Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

{type}BandMat



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

Synopsis

#include <rw/dbandmat.h>          // DoubleBandMat
#include <rw/cbandmat.h>          // DComplexBandMat
#include <rw/fbandmat.h>          // FloatBandMat

DoubleBandMat d;

Description

The classes {TYPE}BandMat encapsulate a banded matrix. A banded matrix is nonzero only near the diagonal. Specifically, if u is the upper bandwidth and l the lower, the matrix entry Aij is defined as 0 if either j-i>u or i-j>l. The total bandwidth, simply called bandwidth, is the sum of the upper and lower bandwidths plus 1, for the diagonal. See the Storage Scheme section of this entry for an example of a banded matrix.

Example

Storage Scheme

The matrix is stored column-by-column. There are some unused locations in the vector of data so that each column takes up the same number of entries. For example, the following 9x9 matrix has an upper bandwidth of 1, a lower bandwidth of 2, and thus a total bandwidth of 4:

This matrix is stored as follows:

[ XXX A11 A21 A31 A12 A22 A32 A42 A23 A33 A43 A53

A34 A44 A54 A64 A45 A55 A65 A75 A56 A66 A76 A86

A67 A77 A87 A97 A78 A88 A98 XXX A89 A99 XXX XXX ]

where XXX indicates an unused storage location. The mapping between array entry Aij and the storage vector is as follows:

Public Constructors

DoubleBandMat();
FloatBandMat();
DComplexBandMat();
DoubleBandMat(const DoubleBandMat& A);
FloatBandMat(const FloatBandMat& A);
DComplexBandMat(const DComplexBandMat& A);
DoubleBandMat(unsigned n, unsigned n, unsigned lb, 
unsigned ub); FloatBandMat(unsigned n, unsigned n, unsigned lb,
unsigned ub); DComplexBandMat(unsigned n, unsigned n, unsigned lb,
unsigned ub);
DoubleBandMat(const RWMathVec<double>& vd, unsigned n,
unsigned n,unsigned lb, unsigned ub); FloatBandMat(const RWMathVec<float>& vd, unsigned n,
unsigned n, unsigned lb, unsigned ub); DComplexBandMat(const RWMathVec<DComplex>& vd, unsigned n
unsigned n, unsigned lb, unsigned ub);
DComplexBandMat(const DoubleBandMat& re);
DComplexBandMat(const DoubleBandMat& re, 
                const DoubleBandMat& im);
DoubleBandMat(const FloatBandMat&);
FloatBandMat(const FloatSymBandMat&);
DoubleBandMat(const FloatSymBandMat&);
DComplexBandMat(const DComplexSymBandMat&);
DComplexBandMat(const DComplexHermBandMat&);
FloatBandMat(const FloatTriDiagMat&);
DoubleBandMat(const DoubleTriDiagMat&);
DComplexBandMat(const DComplexTriDiagMat&);

Public Member Functions

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

Public Member Operators

RODoubleRef   FloatBandMat::operator()(int i, int j);
double        FloatBandMat::operator()(int i, int j) const;
ROFloatRef    DoubleBandMat::operator()(int i, int j);
float         DoubleBandMat::operator()(int i, int j) const;
RODComplexRef DComplexBandMat::operator()(int i, int j);
DComplex      DComplexBandMat::operator()(int i, int j) const;
DoubleBandMat&    operator=(const DoubleBandMat& A);
FloatBandMat&     operator=(const FloatBandMat& A);
DComplexBandMat&  operator=(const DComplexBandMat& A);
RWBoolean    operator==(const DoubleBandMat& A);
RWBoolean    operator==(const FloatBandMat& A);
RWBoolean    operator==(const DComplexBandMat& A);
RWBoolean    operator!=(const DoubleBandMat& A);
RWBoolean    operator!=(const FloatBandMat& A);
RWBoolean    operator!=(const DComplexBandMat& A);
DoubleBandMat&    operator*=(double x);
FloatBandMat&     operator*=(float x);
DComplexBandMat&  operator*=(DComplex x);
DoubleBandMat&    operator/=(double x);
FloatBandMat&     operator/=(float x);
DComplexBandMat&  operator/=(DComplex x);
DoubleBandMat&    operator+=(const DoubleBandMat& A);
FloatBandMat&     operator+=(const FloatBandMat& A);
DComplexBandMat&  operator+=(const DComplexBandMat& A);
DoubleBandMat&    operator-=(const DoubleBandMat& A);
FloatBandMat&     operator-=(const FloatBandMat& A);
DComplexBandMat&  operator-=(const DComplexBandMat& A);
DoubleBandMat&    operator*=(const DoubleBandMat& A);
FloatBandMat&     operator*=(const FloatBandMat& A);
DComplexBandMat&  operator*=(const DComplexBandMat& A);
DoubleBandMat&    operator/=(const DoubleBandMat& A);
FloatBandMat&     operator/=(const FloatBandMat& A);
DComplexBandMat&  operator/=(const DComplexBandMat& A);

Global Operators

DoubleBandMat    operator+(const DoubleBandMat&);
FloatBandMat     operator+(const FloatBandMat&);
DComplexBandMat  operator+(const DComplexBandMat&);
DoubleBandMat    operator-(const DoubleBandMat&);
FloatBandMat     operator-(const FloatBandMat&);
DComplexBandMat  operator-(const DComplexBandMat&);
DoubleBandMat    operator+(const DoubleBandMat&, 
const DoubleBandMat&); FloatBandMat operator+(const FloatBandMat&,
const FloatBandMat&); DComplexBandMat operator+(const DComplexBandMat&,
const DComplexBandMat&); DoubleBandMat operator-(const DoubleBandMat&,
const DoubleBandMat&); FloatBandMat operator-(const FloatBandMat&,
const FloatBandMat&); DComplexBandMat operator-(const DComplexBandMat&,
const DComplexBandMat&); DoubleBandMat operator*(const DoubleBandMat&,
const DoubleBandMat&); FloatBandMat operator*(const FloatBandMat&,
const FloatBandMat&); DComplexBandMat operator*(const DComplexBandMat&,
const DComplexBandMat&); DoubleBandMat operator/(const DoubleBandMat&,
const DoubleBandMat&); FloatBandMat operator/(const FloatBandMat&,
const FloatBandMat&); DComplexBandMat operator/(const DComplexBandMat&,
const DComplexBandMat&);
DoubleBandMat    operator*(double,const DoubleBandMat&);
DoubleBandMat    operator*(const DoubleBandMat&,double);
FloatBandMat     operator*(float,const FloatBandMat&);
FloatBandMat     operator*(const FloatBandMat&,float);
DComplexBandMat  operator*(DComplex,const DComplexBandMat&);
DComplexBandMat  operator*(const DComplexBandMat&,DComplex);
DoubleBandMat    operator/(const DoubleBandMat&,double);
FloatBandMat     operator/(const FloatBandMat&,float);
DComplexBandMat  operator/(const DComplexBandMat&,DComplex);
ostream&    operator<<(ostream& s, const DoubleBandMat&);
ostream&    operator<<(ostream& s, const FloatBandMat&);
ostream&    operator<<(ostream& s, const DComplexBandMat&);
istream&    operator>>(istream& s, const DoubleBandMat&);
istream&    operator>>(istream& s, const FloatBandMat&);
istream&    operator>>(istream& s, const DComplexBandMat&);

Global Functions

DoubleBandMat
abs(const DoubleBandMat&);
FloatBandMat
abs(const FloatBandMat&);
DoubleBandMat
abs(const DComplexBandMat&);
DoubleBandMat
arg(const DComplexBandMat& A);
DComplexBandMat
conj(const DComplexBandMat& A);
DComplexBandMat
conjTransposeProduct(const DComplexBandMat& A, 
const DComplexBandMat& B);
DoubleBandMat
imag(const DComplexBandMat& A);
double
maxValue(const DoubleBandMat&);
float
maxValue(const FloatBandMat&);
double
minValue(const DoubleBandMat&);
float
minValue(const FloatBandMat&);
DoubleBandMat
norm(const DComplexBandMat& A);
DoubleBandMat
product(const DoubleBandMat& A, const DoubleBandMat& B);
FloatBandMat
product(const FloatBandMat& A, const FloatBandMat& B);
DComplexBandMat
product(const DComplexBandMat& A, const DComplexBandMat& B);
RWMathVec<double>
product(const DoubleBandMat& A, const RWMathVec<double>& x);
RWMathVec<float>
product(const FloatBandMat& A, const RWMathVec<float>& x);
RWMathVec<DComplex>
product(const DComplexBandMat& A, const RWMathVec<DComplex>& x);
RWMathVec<double>
product(const RWMathVec<double>& x, const DoubleBandMat& A);
RWMathVec<float>
product(const RWMathVec<float>& x, const FloatBandMat& A);
RWMathVec<DComplex>
product(const RWMathVec<DComplex>& x, const DComplexBandMat& A);
DoubleBandMat
real(const DComplexBandMat& A);
DoubleBandMat
toBandMat(const RWGenMat<double>&, unsigned bl, unsigned bu);
FloatBandMat
toBandMat(const RWGenMat<float>&, unsigned bl, unsigned bu);
DComplexBandMat
toBandMat(const RWGenMat<DComplex>&, unsigned bl, unsigned bu);
FloatBandMat
toFloat(const DoubleBandMat&);
DComplexBandMat
toHermBandMat(const DComplexBandMat& A);
DoubleSymBandMat
toSymBandMat(const DoubleBandMat& A);
FloatSymBandMat
toSymBandMat(const FloatBandMat& A);
DComplexSymBandMat
toSymBandMat(const DComplexBandMat& A);
DoubleTriDiagMat
toTriDiagMat(const DoubleBandMat& A);
FloatTriDiagMat
toTriDiagMat(const FloatBandMat& A);
DComplexTriDiagMat
toTriDiagMat(const DComplexBandMat& A);
DoubleBandMat
transpose(const DoubleBandMat&);
FloatBandMat
transpose(const FloatBandMat&);
DComplexBandMat
transpose(const DComplexBandMat&);
DoubleBandMat
transposeProduct(const DoubleBandMat& A,
const DoubleBandMat& B); FloatBandMat transposeProduct(const FloatBandMat& A,
const FloatBandMat& B); DComplexBandMat transposeProduct(const DComplexBandMat& A, const DComplexBandMat& B);


Previous fileTop of DocumentContentsIndexNext file

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