Sparse container class for vectorial data. More...
#include "utl/SparseVector.h"
Classes | |
| class | IteratorTransformer |
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 SparseVector(const SparseVector<U>& v) : fInitializer(v.GetInitializer()) { for (typename SparseVector<U>::ConstIterator it = v.SparseBegin() | |
| bool | const |
| it = v.SparseEnd() | |
| return | it == fVector.end() |
| it(* | this )(it.GetIndex()) = it() |
Private Types | |
| typedef MapType::const_iterator | MapConstIterator |
| typedef MapType::iterator | MapIterator |
| typedef std::map< IndexType, T > | MapType |
| typedef MapType::value_type | MapValueType |
Private Member Functions | |
| void | Erase (const MapIterator it) |
Private Attributes | |
| const T | fInitializer |
| MapType | fVector |
Sparse container class for vectorial data.
Importatant notes:
Please refer to the testSparseVector.cc and test SparseMatrixVectorOps.cc files for detailed usage cases.
Definition at line 36 of file SparseVector.h.
| typedef IteratorTransformer<MapConstIterator, const T> utl::SparseVector< T >::ConstIterator |
Definition at line 176 of file SparseVector.h.
| typedef int utl::SparseVector< T >::IndexType |
Definition at line 38 of file SparseVector.h.
| typedef IteratorTransformer<MapIterator, T> utl::SparseVector< T >::Iterator |
Definition at line 175 of file SparseVector.h.
|
private |
Definition at line 44 of file SparseVector.h.
|
private |
Definition at line 43 of file SparseVector.h.
|
private |
Definition at line 41 of file SparseVector.h.
|
private |
Definition at line 42 of file SparseVector.h.
|
inline |
Definition at line 86 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
|
inlineprivate |
Definition at line 226 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
Referenced by utl::SparseVector< T >::Reclaim().
|
inline |
Definition at line 186 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
Referenced by utl::operator*(), and TestSparseVector::TestIterators().
|
inline |
Definition at line 189 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
|
inline |
Definition at line 84 of file SparseVector.h.
References utl::SparseVector< T >::fInitializer.
Referenced by utl::SparseVector< T >::operator==().
|
inline |
Definition at line 82 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
Referenced by TestSparseVector::TestAccess(), and TestSparseVector::TestAddSubtract().
|
inline |
Definition at line 112 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
Referenced by utl::Output(), and TestSparseVector::TestAddSubtract().
|
inline |
Definition at line 146 of file SparseVector.h.
References utl::SparseVector< T >::operator==().
|
inline |
Definition at line 172 of file SparseVector.h.
References utl::SparseVector< T >::operator==().
|
inline |
creating element access
Definition at line 99 of file SparseVector.h.
References utl::SparseVector< T >::fInitializer, and utl::SparseVector< T >::fVector.
|
inline |
Definition at line 105 of file SparseVector.h.
References utl::SparseVector< T >::fInitializer, utl::SparseVector< T >::fVector, and utl::SparseVector< T >::it.
|
inline |
multiplication with scalar
Definition at line 195 of file SparseVector.h.
References utl::SparseVector< T >::fVector, and utl::SparseVector< T >::it.
|
inline |
vector addition
Definition at line 205 of file SparseVector.h.
References utl::SparseVector< T >::it, utl::SparseVector< T >::SparseBegin(), and utl::SparseVector< T >::SparseEnd().
|
inline |
vector subtraction
Definition at line 216 of file SparseVector.h.
References utl::SparseVector< T >::it, utl::SparseVector< T >::SparseBegin(), and utl::SparseVector< T >::SparseEnd().
|
inline |
Definition at line 139 of file SparseVector.h.
References utl::SparseVector< T >::fInitializer, and utl::SparseVector< T >::fVector.
Referenced by utl::SparseVector< T >::operator!=().
|
inline |
Definition at line 150 of file SparseVector.h.
References utl::SparseVector< T >::fInitializer, utl::SparseVector< T >::IteratorTransformer< IteratorType, ValueType >::GetIndex(), utl::SparseVector< T >::GetInitializer(), utl::SparseVector< T >::SparseBegin(), and utl::SparseVector< T >::SparseEnd().
|
inline |
noncreating element access
Definition at line 90 of file SparseVector.h.
References utl::SparseVector< T >::fInitializer, utl::SparseVector< T >::fVector, and utl::SparseVector< T >::it.
|
inline |
remove "empty" elements (that are equal to the initializer)
Definition at line 124 of file SparseVector.h.
References utl::SparseVector< T >::Erase(), utl::SparseVector< T >::fInitializer, utl::SparseVector< T >::fVector, and utl::SparseVector< T >::it.
Referenced by TestSparseVector::TestAccess(), and TestSparseVector::TestAddSubtract().
|
inline |
Definition at line 178 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
Referenced by utl::operator*(), utl::SparseVector< T >::operator+=(), utl::SparseVector< T >::operator-=(), utl::SparseVector< T >::operator==(), TestSparseVector::TestIterators(), and TestSparseMatrixVectorOp::TestMultiply().
|
inline |
Definition at line 180 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
|
inline |
Definition at line 182 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
Referenced by utl::operator*(), utl::SparseVector< T >::operator+=(), utl::SparseVector< T >::operator-=(), utl::SparseVector< T >::operator==(), TestSparseVector::TestIterators(), and TestSparseMatrixVectorOp::TestMultiply().
|
inline |
Definition at line 184 of file SparseVector.h.
References utl::SparseVector< T >::fVector.
| utl::SparseVector< T >::__pad0__ |
Definition at line 77 of file SparseVector.h.
| bool utl::SparseVector< T >::const |
Definition at line 117 of file SparseVector.h.
|
private |
Definition at line 228 of file SparseVector.h.
Referenced by utl::SparseVector< T >::GetInitializer(), utl::SparseVector< T >::operator()(), utl::SparseVector< T >::operator==(), utl::SparseVector< T >::operator[](), and utl::SparseVector< T >::Reclaim().
|
private |
Definition at line 229 of file SparseVector.h.
Referenced by utl::SparseVector< T >::Clear(), utl::SparseVector< T >::Erase(), utl::SparseVector< T >::Find(), utl::SparseVector< T >::GetNonEmptySize(), utl::SparseVector< T >::IsEmpty(), utl::SparseVector< T >::operator()(), utl::SparseVector< T >::operator*=(), utl::SparseVector< T >::operator==(), utl::SparseVector< T >::operator[](), utl::SparseVector< T >::Reclaim(), utl::SparseVector< T >::SparseBegin(), and utl::SparseVector< T >::SparseEnd().
| utl::SparseVector< T >::it = v.SparseEnd() |
Definition at line 78 of file SparseVector.h.
Referenced by utl::SparseVector< T >::operator()(), utl::SparseVector< T >::operator*=(), utl::SparseVector< T >::operator+=(), utl::SparseVector< T >::operator-=(), utl::SparseVector< T >::operator[](), and utl::SparseVector< T >::Reclaim().
| return utl::SparseVector< T >::it == fVector.end() |
Definition at line 119 of file SparseVector.h.
| it(* utl::SparseVector< T >::this)(it.GetIndex()) = it() |
Definition at line 79 of file SparseVector.h.