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

RWSkewMat<T>

Module:  Linear Algebra   Group:  Sparse Matrix classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/lapack/skewmat.h>

RWSkewMat<double> A;

Description

The class RWSkewMat<T> encapsulates skew symmetric matrices. A skew symmetric matrix is defined by the requirement that Aij = -Aji. This strict definition implies that the diagonal entries must be 0. This requirement is relaxed by the Rogue Wave skew symmetric matrix classes, which require only that Aij = -Aji for the off-diagonal elements; in other words, the diagonal need not be 0. Skew symmetric matrices with nonzero diagonals are sometimes useful, for example, as rotation matrices in computer graphics applications.

Example

Storage Scheme

The upper triangle of the matrix is stored in column major order. The lower triangle is then calculated implicitly.

The data is stored in the following order:

[ A11 A12 A22 A13 A23 A33 ... A1n A2n A3n ... Ann ] 

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

Public Constructors

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

Public Member Functions

RWNGRef<float>
bcref(int i, int j);
void
bcset(int i, int j, T x);
float
bcval(int i, int j);
unsigned
binaryStoreSize();
unsigned
cols();
RWSkewMat<T>
copy();
T*
data();
RWMathVec<T>
dataVec();
RWSkewMat<T>
deepCopy();
void
deepenShallowCopy();
RWSkewMat<T>
leadingSubmatrix(int k);
void
printOn(ostream&);
RWNGRef<T>
ref(int i, int j);
RWSkewMat<T>
reference(RWSkewMat<T>&);
void
resize(unsigned n, unsigned n);
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);
T
val(int i, int j);
RWSkewMat<T>
zero();

Public Member Operators

RWNGRef<float>  RWSkewMat<float>::operator()(int i,
                                     int j);
double          RWSkewMat<double>::operator()(int i,
                                     int j) const;
RWNGRef<double> RWSkewMat<double>::operator()(int i,
                                     int j);
double          RWSkewMat<double>::operator()(int i,
                                     int j) const;
RWNGRef         RWSkewMat<DComplex>::operator()(int
                                     i, int j);
DComplex        RWSkewMat<DComplex>::operator()(int
                                     i, int j) const;
RWSkewMat<T>&     operator=(const RWSkewMat<T>& A);
RWSkewMat<T>&      operator==(const RWSkewMat<T>& A);
RWSkewMat<T>&      operator!=(const RWSkewMat<T>& A);
RWSkewMat<T>&      operator*=(T x);
RWSkewMat<T>&      operator/=(T x);
RWSkewMat<T>&      operator+=(const RWSkewMat<T>& A);
RWSkewMat<T>&      operator-=(const RWSkewMat<T>& A);
RWSkewMat<T>&      operator*=(const RWSkewMat<T>& A);
RWSkewMat<T>&      operator/=(const RWSkewMat<T>& A);

Global Operators

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

Global Functions

RWSymMat<T>
abs(const RWSkewMat<T>&);
RWSkewMat<DComplex>
conj(const RWSkewMat<DComplex>& A);
RWSymMat<double>
imag(const RWSkewMat<DComplex>& A);
RWSymMat<float>
norm(const RWSkewMat<float>& A);
RWSymMat<double>
norm(const RWSkewMat<double>& A);
RWSymMat<double>
norm(const RWSkewMat<DComplex>& A);
RWMathVec<T>
product(const RWSkewMat<T>& A, const RWMathVec<T>&
x);
RWMathVec<T>
product(const RWMathVec<T>& x, const RWSkewMat<T>&
A);
RWSkewMat<double>
real(const RWSkewMat<DComplex>& A);
RWSkewMat<float>
toFloat(const RWSkewMat<double>&);
RWSymMat<T>
toSkewMat(const RWGenMat<T>&, bool keepMainDiag=true);
RWSkewMat<T>
transpose(const RWSkewMat<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.