Sparse container class for matrix data. More...
#include "utl/SparseMatrix.h"
Classes | |
| class | Index |
| index class More... | |
| class | IteratorTransformer |
| iterator class More... | |
| class | Row |
| row proxy More... | |
Public Types | |
| typedef IteratorTransformer < MapConstIterator, const T > | ConstIterator |
| typedef int | IndexType |
| typedef IteratorTransformer < MapIterator, T > | Iterator |
Public Attributes | |
| __pad0__: fInitializer(init) { } template<typename U> explicit SparseMatrix(const SparseMatrix<U>& m) : fInitializer(m.GetInitializer()) { for (typename SparseMatrix<U>::ConstIterator it = m.SparseBegin() | |
| bool | const |
| it = m.SparseEnd() | |
| return | it == fMatrix.end() |
| it(* | this )(it.GetRow(), it.GetColumn()) = it() |
Private Types | |
| typedef SparseMatrix< T >::Index | IndexKeyType |
| typedef MapType::const_iterator | MapConstIterator |
| typedef MapType::iterator | MapIterator |
| typedef std::map< IndexKeyType, T > | MapType |
| typedef MapType::value_type | MapValueType |
Private Member Functions | |
| void | Erase (const MapIterator it) |
Private Attributes | |
| const T | fInitializer |
| MapType | fMatrix |
Friends | |
| template<typename U > | |
| class | SparseMatrix |
Sparse container class for matrix data.
Importatant notes:
Please refer to the testSparseMatrix.cc and test SparseMatrixVectorOps.cc files for detailed usage cases.
Definition at line 36 of file SparseMatrix.h.
| typedef IteratorTransformer<MapConstIterator, const T> utl::SparseMatrix< T >::ConstIterator |
Definition at line 213 of file SparseMatrix.h.
|
private |
Definition at line 78 of file SparseMatrix.h.
| typedef int utl::SparseMatrix< T >::IndexType |
Definition at line 38 of file SparseMatrix.h.
| typedef IteratorTransformer<MapIterator, T> utl::SparseMatrix< T >::Iterator |
Definition at line 212 of file SparseMatrix.h.
|
private |
Definition at line 82 of file SparseMatrix.h.
|
private |
Definition at line 81 of file SparseMatrix.h.
|
private |
Definition at line 79 of file SparseMatrix.h.
|
private |
Definition at line 80 of file SparseMatrix.h.
|
inline |
Definition at line 127 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
|
inlineprivate |
Definition at line 274 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
Referenced by utl::SparseMatrix< T >::Reclaim().
|
inline |
Definition at line 223 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
Referenced by TestSparseMatrix::TestIterators().
|
inline |
Definition at line 226 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
|
inline |
Definition at line 125 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fInitializer.
Referenced by utl::SparseMatrix< T >::operator==(), and utl::Output().
|
inline |
Definition at line 123 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
Referenced by TestSparseMatrix::TestOperators().
|
inline |
Definition at line 152 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
Referenced by utl::OutputSparse().
|
inline |
be sure to call Reclaim() first
Definition at line 182 of file SparseMatrix.h.
References utl::SparseMatrix< T >::operator==().
|
inline |
Definition at line 210 of file SparseMatrix.h.
References utl::SparseMatrix< T >::operator==().
|
inline |
creational () access
Definition at line 137 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fInitializer, and utl::SparseMatrix< T >::fMatrix.
|
inline |
noncreational () access for const
Definition at line 145 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fInitializer, utl::SparseMatrix< T >::fMatrix, and utl::SparseMatrix< T >::it.
|
inline |
multiplication with scalar
Definition at line 232 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix, and utl::SparseMatrix< T >::it.
|
inline |
matrix addition
Definition at line 242 of file SparseMatrix.h.
References utl::SparseMatrix< T >::it, utl::SparseMatrix< T >::SparseBegin(), and utl::SparseMatrix< T >::SparseEnd().
|
inline |
matrix subtraction
Definition at line 253 of file SparseMatrix.h.
References utl::SparseMatrix< T >::it, utl::SparseMatrix< T >::SparseBegin(), and utl::SparseMatrix< T >::SparseEnd().
|
inline |
be sure to call Reclaim() first
Definition at line 178 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fInitializer, and utl::SparseMatrix< T >::fMatrix.
Referenced by utl::SparseMatrix< T >::operator!=().
|
inline |
Definition at line 186 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fInitializer, utl::SparseMatrix< T >::IteratorTransformer< IteratorType, ValueType >::GetColumn(), utl::SparseMatrix< T >::GetInitializer(), utl::SparseMatrix< T >::IteratorTransformer< IteratorType, ValueType >::GetRow(), utl::SparseMatrix< T >::SparseBegin(), and utl::SparseMatrix< T >::SparseEnd().
|
inline |
noncreational [] access trough proxy
Definition at line 131 of file SparseMatrix.h.
|
inline |
Definition at line 163 of file SparseMatrix.h.
References utl::SparseMatrix< T >::Erase(), utl::SparseMatrix< T >::fInitializer, utl::SparseMatrix< T >::fMatrix, and utl::SparseMatrix< T >::it.
Referenced by TestSparseMatrix::TestAccess(), and TestSparseMatrix::TestOperators().
|
inline |
Definition at line 215 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
Referenced by utl::operator*(), utl::SparseMatrix< T >::operator+=(), utl::SparseMatrix< T >::operator-=(), utl::operator<<(), utl::SparseMatrix< T >::operator==(), TestSparseMatrix::TestIterators(), and TestSparseMatrix::TestOperators().
|
inline |
Definition at line 217 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
|
inline |
Definition at line 219 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
Referenced by utl::operator*(), utl::SparseMatrix< T >::operator+=(), utl::SparseMatrix< T >::operator-=(), utl::operator<<(), utl::SparseMatrix< T >::operator==(), TestSparseMatrix::TestIterators(), and TestSparseMatrix::TestOperators().
|
inline |
Definition at line 221 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix.
|
inline |
in-situ transpose
Definition at line 263 of file SparseMatrix.h.
References utl::SparseMatrix< T >::fMatrix, utl::SparseMatrix< T >::Index::GetColumn(), utl::SparseMatrix< T >::Index::GetRow(), and utl::SparseMatrix< T >::it.
Referenced by TestSparseMatrix::TestTranspose().
Definition at line 279 of file SparseMatrix.h.
| utl::SparseMatrix< T >::__pad0__ |
Definition at line 118 of file SparseMatrix.h.
| bool utl::SparseMatrix< T >::const |
Definition at line 157 of file SparseMatrix.h.
|
private |
Definition at line 277 of file SparseMatrix.h.
Referenced by utl::SparseMatrix< T >::GetInitializer(), utl::SparseMatrix< T >::operator()(), utl::SparseMatrix< T >::operator==(), and utl::SparseMatrix< T >::Reclaim().
|
private |
Definition at line 276 of file SparseMatrix.h.
Referenced by utl::SparseMatrix< T >::Clear(), utl::SparseMatrix< T >::Erase(), utl::SparseMatrix< T >::Find(), utl::SparseMatrix< T >::GetNonEmptySize(), utl::SparseMatrix< T >::IsEmpty(), utl::SparseMatrix< T >::operator()(), utl::SparseMatrix< T >::operator*=(), utl::SparseMatrix< T >::operator==(), utl::SparseMatrix< T >::Reclaim(), utl::SparseMatrix< T >::SparseBegin(), utl::SparseMatrix< T >::SparseEnd(), and utl::SparseMatrix< T >::Transpose().
| utl::SparseMatrix< T >::it = m.SparseEnd() |
Definition at line 119 of file SparseMatrix.h.
Referenced by utl::SparseMatrix< T >::operator()(), utl::SparseMatrix< T >::operator*=(), utl::SparseMatrix< T >::operator+=(), utl::SparseMatrix< T >::operator-=(), utl::SparseMatrix< T >::Reclaim(), and utl::SparseMatrix< T >::Transpose().
| return utl::SparseMatrix< T >::it == fMatrix.end() |
Definition at line 159 of file SparseMatrix.h.
| it(* utl::SparseMatrix< T >::this)(it.GetRow(), it.GetColumn()) = it() |
Definition at line 120 of file SparseMatrix.h.