Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Linear Algebra Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWSymBandMat<T>

Module:  Linear Algebra   Group:  Sparse Matrix classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/lapack/sbndmat.h>

RWSymBandMat<double> d;

Description

The class RWSymBandMat<T> encapsulates symmetric band matrices. A symmetric banded matrix is symmetric, and nonzero only near the diagonal. Specifically, if h is the half bandwidth, then any entries for which i-j>h or
j-i>h are defined to be 0; in addition, an entry Aij = Aji.

Example

Storage Scheme

As an example of the storage scheme, consider the following 9 x 9 matrix with a half bandwidth of two:

The upper triangle is stored column by column. For convenience, there are some unused locations left in the vector of data. These are indicated as XXX in the following illustration of the storage vector:

[ XXX XXX A11 XXX A12 A22 A13 A23 A33 A24 A34 A44 A35 A45 A55
A46 A56 A66 A57 A67 A77 A68 A78 A88 A79 A89 A99 ]

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

Public Constructors

RWSymBandMat();
RWSymBandMat(const RWSymBandMat<T>& A);
RWSymBandMat(unsigned n, unsigned n, unsigned hb);
RWSymBandMat(const RWMathVec<T>& vd, 
                 unsigned n, unsigned n, unsigned hb);
RWSymBandMat<DComplex>(const RWSymBandMat<double>&
re); RWSymBandMat<DComplex>(const RWSymBandMat<double>&
re, const
RWSymBandMat<double>& im);
RWSymBandMat<double>(const RWSymBandMat<float>&);

Public Member Functions

unsigned
bandwidth();
RWMathVec<T>
bcdiagonal(int j=0);
RWRORef<T>
bcref(int i, int j);
void
bcset(int i, int j, T x);
T
bcval(int i, int j);
unsigned
binaryStoreSize();
unsigned
cols();
RWSymBandMat<T>
copy();
T*
data();
RWMathVec<T>
dataVec();
RWSymBandMat<T>
deepCopy();
void
deepenShallowCopy();
RWMathVec<T>
diagonal(int j=0);
unsigned
halfBandwidth();
RWSymBandMat<T>
leadingSubmatrix(int k);
unsigned
lowerBandwidth();
void
printOn(ostream&);
RWRORef<T>
ref(int i, int j);
RWSymBandMat<T>
reference(RWSymBandMat<T>&);
void 
resize(unsigned n, unsigned n);
void 
resize(unsigned n, unsigned n, unsigned hb);
void
restoreFrom(RWFile&);
void
restoreFrom(RWvistream&);
unsigned
rows();
void
saveOn(RWFile&);
void
saveOn(RWvostream&);
void
scanFrom(istream&);
void
set(int i, int j, T x);
unsigned
upperBandwidth();
T
val(int i, int j);
RWSymBandMat<T>
zero();

Public Member Operators

RWRORef<T>   RWSymBandMat<T>::operator()(int i,
int j); T RWSymBandMat<T>::operator()(int i,
int j) const;
RWSymBandMat<T>&    operator=(const RWSymBandMat<T>&
A);
RWSymBandMat<T>&    operator==(const RWSymBandMat<T>&
A); RWSymBandMat<T>& operator!=(const RWSymBandMat<T>&
A);
RWSymBandMat<T>&    operator*=(T x);
RWSymBandMat<T>&    operator/=(T x);
RWSymBandMat<T>&   operator+=(const RWSymBandMat<T>&
A); RWSymBandMat<T>& operator-=(const RWSymBandMat<T>&
A); RWSymBandMat<T>& operator*=(const RWSymBandMat<T>&
A); RWSymBandMat<T>& operator/=(const RWSymBandMat<T>&
A);
RWSymBandMat<T>    operator+(const RWSymBandMat<T>&);
RWSymBandMat<T>    operator-(const RWSymBandMat<T>&);
RWSymBandMat<T>    operator+(const RWSymBandMat<T>&, 
const RWSymBandMat<T>&); RWSymBandMat<T> operator-(const RWSymBandMat<T>&,
const RWSymBandMat<T>&); RWSymBandMat<T> operator*(const RWSymBandMat<T>&,
const RWSymBandMat<T>&); RWSymBandMat<T> operator/(const RWSymBandMat<T>&,
const RWSymBandMat<T>&);
RWSymBandMat<T>   operator*(T, const
RWSymBandMat<T>&); RWSymBandMat<T> operator*(const RWSymBandMat<T>&,
T); RWSymBandMat<T> operator/(const RWSymBandMat<T>&,
T);
ostream&   operator<<(ostream& s, const
RWSymBandMat<T>&);
istream&   operator>>(istream& s, const
RWSymBandMat<T>&);

Global Functions

RWSymBandMat<T>
abs(const RWSymBandMat<T>&);
RWSymBandMat<double>
arg(const RWSymBandMat<DComplex>& A);
RWSymBandMat<DComplex>
conj(const RWSymBandMat<DComplex>& A);
RWSymBandMat<double>
imag(const RWSymBandMat<DComplex>& A);
double
maxValue(const RWSymBandMat<double>&);
float
maxValue(const RWSymBandMat<float>&);
double
minValue(const RWSymBandMat<double>&);
float
minValue(const RWSymBandMat<float>&);
RWSymBandMat<double>
norm(const RWSymBandMat<DComplex>& A);
RWMathVec<T>
product(const RWSymBandMat<T>& A, const RWMathVec<T>&
x);
RWMathVec<T>
product(const RWMathVec<T>& x, const RWSymBandMat<T>&
A);
RWSymBandMat<double>
real(const RWSymBandMat<DComplex>& A);
RWSymBandMat<float>
toFloat(const RWSymBandMat<double>&);
RWSymBandMat<T>
toSymBandMat(const RWGenMat<T>&);
RWSymBandMat<T>
transpose(const RWSymBandMat<T>&);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.