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

RWHermBandMat<T>

Module:  Linear Algebra   Group:  Sparse Matrix classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/lapack/hbndmat.h>

RWHermBandMat<DComplex> H;

Description

The class RWHermBandMat<T> encapsulates a Hermitian banded matrix. A Hermitian banded matrix is Hermitian, 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 = conj(Aji). Although this strict definition implies a matrix with 0 imaginary parts along the diagonal, the Rogue Wave class implementation allows arbitrary diagonal entries.

Example

Storage Scheme

As an example of the storage scheme for banded Hermitian matrices, consider the following 9x9 matrix with a half bandwidth of 2, where entries aij are notation for conj(Aij):

The upper triangle is stored column by column. For convenience, there are some unused locations 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
A
55 A46 A56 A66 A57 A67 A77 A68 A78 A88 A79 A89 A99 ]

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

Public Constructors

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

Public Member Functions

unsigned
bandwidth();
RWROCJRef<T>
bcref(int i, int j);
void
bcset(int i, int j, DComplex x);
T
bcval(int i, int j);
unsigned
binaryStoreSize();
unsigned
cols();
RWHermBandMat<T>
copy();
T*
data();
RWMathVec<T>
dataVec();
RWHermBandMat<T>
deepCopy();
void
deepenShallowCopy();
unsigned
halfBandwidth();
RWHermBandMat<T>
leadingSubmatrix(int k);
unsigned
lowerBandwidth();
void
makeDiagonalReal();
void
printOn(ostream&);
RWROCJRef<T>
ref(int i, int j);
RWHermBandMat<T>
reference(DComplexHermBandMat&);
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, DComplex x);
unsigned
upperBandwidth();
T
val(int i, int j);
RWHermBandMat<T>
zero();

Public Member Operators

RWROCJRef<T>  RWHermBandMat<T>::operator()(int i, int j);
T             RWHermBandMat<T>::operator()(int i, int j)const;
RWHermBandMat<T>&  operator=(const RWHermBandMat<T>& A);
RWHermBandMat<T>& operator==(const RWHermBandMat<T>& A);
RWHermBandMat<T>& operator!=(const RWHermBandMat<T>& A);
RWHermBandMat<T>&    operator*=(T x);
RWHermBandMat<T>&    operator/=(T x);
RWHermBandMat<T>& operator+=(const RWHermBandMat<T>& A);
RWHermBandMat<T>& operator-=(const RWHermBandMat<T>& A);
RWHermBandMat<T>& operator*=(const RWHermBandMat<T>& A);
RWHermBandMat<T>& operator/=(const RWHermBandMat<T>& A);

Global Operators

RWHermBandMat<T>    operator+(const RWHermBandMat<T>&);
RWHermBandMat<T>    operator-(const RWHermBandMat<T>&);
RWHermBandMat<T>    operator+(const RWHermBandMat<T>&,
const RWHermBandMat<T>&); RWHermBandMat<T> operator-(const RWHermBandMat<T>&,
const RWHermBandMat<T>&); RWHermBandMat<T> operator*(const RWHermBandMat<T>&,
const RWHermBandMat<T>&); RWHermBandMat<T> operator/(const RWHermBandMat<T>&,
const RWHermBandMat<T>&);
RWHermBandMat<T>    operator*(T, const RWHermBandMat<T>&);
RWHermBandMat<T>    operator*(const RWHermBandMat<T>&, T);
RWHermBandMat<T>    operator/(const RWHermBandMat<T>&, T);
ostream&  operator<<(ostream& s, const RWHermBandMat<T>&);
istream&  operator>>(istream& s, const RWHermBandMat<T>&);

Global Functions

RWSymBandMat<double>
abs(const RWHermBandMat<T>& A);
RWHermBandMat<T>
conj(const RWHermBandMat<T>& A);
RWSymMat<double>
norm(const RWHermBandMat<T>& A);
RWMathVec<T>
product(const RWHermBandMat<T>& A, 
const RWMathVec<T>& x);
RWMathVec<T>
product(const RWMathVec<T>& x, 
const RWHermBandMat<T>& A);
RWSymBandMat<double>
real(const RWHermBandMat<T>& A);
RWBandMat<T>
toHermBandMat(const RWGenMat<T>&, unsigned h);
RWHermBandMat<T>
transpose(const RWHermBandMat<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.