KrisLibrary
1.0.0
|
Row-major sparse matrix. More...
#include <SparseMatrixTemplate.h>
Public Types | |
typedef SparseMatrixTemplate_RM< T > | MyT |
typedef VectorTemplate< T > | VectorT |
typedef MatrixTemplate< T > | MatrixT |
typedef SparseVectorTemplate< T > | SparseVectorT |
typedef SparseArray< T > | RowT |
typedef SparseArray< T >::iterator | RowIterator |
typedef SparseArray< T >::const_iterator | ConstRowIterator |
Public Member Functions | |
SparseMatrixTemplate_RM (int m, int n) | |
SparseMatrixTemplate_RM (const MyT &) | |
void | initialize (int m, int n) |
void | resize (int m, int n) |
void | clear () |
T & | operator() (int i, int j) |
void | insertEntry (int i, int j, const T &) |
T * | getEntry (int i, int j) |
returns NULL if the entry does not exist | |
const T * | getEntry (int i, int j) const |
void | eraseEntry (int i, int j) |
void | copy (const MyT &m) |
template<class T2 > | |
void | copy (const SparseMatrixTemplate_RM< T2 > &m) |
void | copySubMatrix (int i, int j, const MyT &) |
void | copySubMatrix (int i, int j, const MatrixT &, T zeroTol=0) |
void | swap (MyT &) |
void | set (const MatrixT &m, T zeroTol=0) |
void | setZero () |
void | setIdentity () |
void | setNegative (const MyT &) |
void | setTranspose (const MyT &) |
void | setAdjoint (const MyT &) |
void | getCopy (MyT &m) const |
void | get (MatrixT &m) const |
void | getTranspose (MyT &m) const |
void | mul (const MyT &, T s) |
void | mul (const VectorT &y, VectorT &x) const |
void | mulTranspose (const VectorT &y, VectorT &x) const |
void | madd (const VectorT &y, VectorT &x) const |
void | maddTranspose (const VectorT &y, VectorT &x) const |
void | mul (const MatrixT &y, MatrixT &x) const |
void | mulTranspose (const MatrixT &y, MatrixT &x) const |
void | copyRow (int i, const VectorT &x, T zeroTol=0) |
void | copyRow (int i, const SparseVectorT &x) |
void | copyCol (int j, const VectorT &x, T zeroTol=0) |
void | copyCol (int j, const SparseVectorT &x) |
T | dotRow (int i, const VectorT &) const |
T | dotCol (int j, const VectorT &) const |
void | inplaceNegative () |
void | inplaceMul (T c) |
void | inplaceDiv (T c) |
void | inplaceMulRow (int i, T c) |
void | inplaceMulCol (int i, T c) |
void | eraseZeros (T zeroTol=0) |
bool | isValid () const |
bool | isEmpty () const |
bool | isSquare () const |
bool | isValidRow (int i) const |
bool | isValidCol (int j) const |
bool | isValidIndex (int i, int j) const |
size_t | numNonZeros () const |
template<> | |
void | setAdjoint (const MyT &A) |
Public Attributes | |
std::vector< RowT > | rows |
int | m |
int | n |
Row-major sparse matrix.
That is, the rows are stored in contiguous order, with each row a sparse array of entries.
mulTranspose operations may not be cache-friendly!