Stores a sparse set of values as a list of values and a list of indices.
Definition at line 32 of file CompressedStorage.h.
#include <src/Sparse/CompressedStorage.h>

Public Types | |
| typedef _Scalar | Scalar |
| typedef _Index | Index |
Public Member Functions | |
| CompressedStorage () | |
| CompressedStorage (size_t size) | |
| CompressedStorage (const CompressedStorage &other) | |
| CompressedStorage & | operator= (const CompressedStorage &other) |
| void | swap (CompressedStorage &other) |
| ~CompressedStorage () | |
| void | reserve (size_t size) |
| void | squeeze () |
| void | resize (size_t size, float reserveSizeFactor=0) |
| void | append (const Scalar &v, Index i) |
| size_t | size () const |
| size_t | allocatedSize () const |
| void | clear () |
| Scalar & | value (size_t i) |
| const Scalar & | value (size_t i) const |
| Index & | index (size_t i) |
| const Index & | index (size_t i) const |
| Index | searchLowerIndex (Index key) const |
| Index | searchLowerIndex (size_t start, size_t end, Index key) const |
| Scalar | at (Index key, Scalar defaultValue=Scalar(0)) const |
| Scalar | atInRange (size_t start, size_t end, Index key, Scalar defaultValue=Scalar(0)) const |
| Like at(), but the search is performed in the range [start,end) | |
| Scalar & | atWithInsertion (Index key, Scalar defaultValue=Scalar(0)) |
| void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
Static Public Member Functions | |
| static CompressedStorage | Map (Index *indices, Scalar *values, size_t size) |
Protected Types | |
| typedef NumTraits< Scalar >::Real | RealScalar |
Protected Member Functions | |
| void | reallocate (size_t size) |
Protected Attributes | |
| Scalar * | m_values |
| Index * | m_indices |
| size_t | m_size |
| size_t | m_allocatedSize |
| typedef _Index CompressedStorage< _Scalar, _Index >::Index |
Definition at line 37 of file CompressedStorage.h.
typedef NumTraits<Scalar>::Real CompressedStorage< _Scalar, _Index >::RealScalar [protected] |
Definition at line 41 of file CompressedStorage.h.
| typedef _Scalar CompressedStorage< _Scalar, _Index >::Scalar |
Definition at line 36 of file CompressedStorage.h.
| CompressedStorage< _Scalar, _Index >::CompressedStorage | ( | ) | [inline] |
Definition at line 45 of file CompressedStorage.h.
| CompressedStorage< _Scalar, _Index >::CompressedStorage | ( | size_t | size ) | [inline] |
Definition at line 49 of file CompressedStorage.h.
| CompressedStorage< _Scalar, _Index >::CompressedStorage | ( | const CompressedStorage< _Scalar, _Index > & | other ) | [inline] |
Definition at line 55 of file CompressedStorage.h.
| CompressedStorage< _Scalar, _Index >::~CompressedStorage | ( | ) | [inline] |
Definition at line 77 of file CompressedStorage.h.
| size_t CompressedStorage< _Scalar, _Index >::allocatedSize | ( | ) | const [inline] |
Definition at line 112 of file CompressedStorage.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::insert().
| void CompressedStorage< _Scalar, _Index >::append | ( | const Scalar & | v, |
| Index | i | ||
| ) | [inline] |
Definition at line 103 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::fill(), SparseMatrix< _Scalar, _Options, _Index >::fill(), SparseVector< _Scalar, _Options, _Index >::insertBack(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), and SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInnerUnordered().
| Scalar CompressedStorage< _Scalar, _Index >::at | ( | Index | key, |
| Scalar | defaultValue = Scalar(0) |
||
| ) | const [inline] |
Definition at line 152 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::coeff().
| Scalar CompressedStorage< _Scalar, _Index >::atInRange | ( | size_t | start, |
| size_t | end, | ||
| Index | key, | ||
| Scalar | defaultValue = Scalar(0) |
||
| ) | const [inline] |
Like at(), but the search is performed in the range [start,end)
Definition at line 165 of file CompressedStorage.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::coeff().
| Scalar& CompressedStorage< _Scalar, _Index >::atWithInsertion | ( | Index | key, |
| Scalar | defaultValue = Scalar(0) |
||
| ) | [inline] |
Definition at line 180 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::coeffRef().
| void CompressedStorage< _Scalar, _Index >::clear | ( | void | ) | [inline] |
| Index& CompressedStorage< _Scalar, _Index >::index | ( | size_t | i ) | [inline] |
Definition at line 118 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::_innerIndexPtr(), SparseMatrix< _Scalar, _Options, _Index >::_innerIndexPtr(), SparseMatrix< _Scalar, _Options, _Index >::coeffRef(), SparseMatrix< _Scalar, _Options, _Index >::fill(), SparseVector< _Scalar, _Options, _Index >::InnerIterator::index(), SparseVector< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::prune(), and CompressedStorage< Scalar, Index >::prune().
| const Index& CompressedStorage< _Scalar, _Index >::index | ( | size_t | i ) | const [inline] |
Definition at line 119 of file CompressedStorage.h.
| static CompressedStorage CompressedStorage< _Scalar, _Index >::Map | ( | Index * | indices, |
| Scalar * | values, | ||
| size_t | size | ||
| ) | [inline, static] |
Definition at line 121 of file CompressedStorage.h.
| CompressedStorage& CompressedStorage< _Scalar, _Index >::operator= | ( | const CompressedStorage< _Scalar, _Index > & | other ) | [inline] |
Definition at line 61 of file CompressedStorage.h.
| void CompressedStorage< _Scalar, _Index >::prune | ( | Scalar | reference, |
| RealScalar | epsilon = NumTraits<RealScalar>::dummy_precision() |
||
| ) | [inline] |
Definition at line 197 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::prune().
| void CompressedStorage< _Scalar, _Index >::reallocate | ( | size_t | size ) | [inline, protected] |
Definition at line 215 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::reserve(), CompressedStorage< Scalar, Index >::resize(), and CompressedStorage< Scalar, Index >::squeeze().
| void CompressedStorage< _Scalar, _Index >::reserve | ( | size_t | size ) | [inline] |
Definition at line 83 of file CompressedStorage.h.
Referenced by SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseVector< _Scalar, _Options, _Index >::reserve(), SparseMatrix< _Scalar, _Options, _Index >::reserve(), SparseVector< _Scalar, _Options, _Index >::startFill(), and SparseMatrix< _Scalar, _Options, _Index >::startFill().
| void CompressedStorage< _Scalar, _Index >::resize | ( | size_t | size, |
| float | reserveSizeFactor = 0 |
||
| ) | [inline] |
Definition at line 96 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::append(), CompressedStorage< Scalar, Index >::atWithInsertion(), CompressedStorage< Scalar, Index >::CompressedStorage(), SparseVector< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::operator=(), CompressedStorage< Scalar, Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::prune(), CompressedStorage< Scalar, Index >::prune(), SparseVector< _Scalar, _Options, _Index >::resizeNonZeros(), and SparseMatrix< _Scalar, _Options, _Index >::resizeNonZeros().
| Index CompressedStorage< _Scalar, _Index >::searchLowerIndex | ( | size_t | start, |
| size_t | end, | ||
| Index | key | ||
| ) | const [inline] |
k in [start,end) such that for all j in [start,k) index[j]<key Definition at line 137 of file CompressedStorage.h.
| Index CompressedStorage< _Scalar, _Index >::searchLowerIndex | ( | Index | key ) | const [inline] |
k such that for all j in [0,k) index[j]<key Definition at line 131 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::at(), CompressedStorage< Scalar, Index >::atInRange(), CompressedStorage< Scalar, Index >::atWithInsertion(), SparseMatrix< _Scalar, _Options, _Index >::coeffRef(), and CompressedStorage< Scalar, Index >::searchLowerIndex().
| size_t CompressedStorage< _Scalar, _Index >::size | ( | ) | const [inline] |
Definition at line 111 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::fill(), SparseMatrix< _Scalar, _Options, _Index >::fill(), SparseMatrix< _Scalar, _Options, _Index >::finalize(), SparseVector< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseVector< _Scalar, _Options, _Index >::insertBack(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), CompressedStorage< Scalar, Index >::Map(), SparseVector< _Scalar, _Options, _Index >::nonZeros(), SparseMatrix< _Scalar, _Options, _Index >::nonZeros(), CompressedStorage< Scalar, Index >::operator=(), CompressedStorage< Scalar, Index >::prune(), CompressedStorage< Scalar, Index >::reallocate(), CompressedStorage< Scalar, Index >::reserve(), CompressedStorage< Scalar, Index >::resize(), and SparseMatrix< _Scalar, _Options, _Index >::startVec().
| void CompressedStorage< _Scalar, _Index >::squeeze | ( | ) | [inline] |
Definition at line 90 of file CompressedStorage.h.
| void CompressedStorage< _Scalar, _Index >::swap | ( | CompressedStorage< _Scalar, _Index > & | other ) | [inline] |
Definition at line 69 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::swap(), SparseMatrix< _Scalar, _Options, _Index >::swap(), and CompressedStorage< Scalar, Index >::swap().
| Scalar& CompressedStorage< _Scalar, _Index >::value | ( | size_t | i ) | [inline] |
Definition at line 115 of file CompressedStorage.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::_valuePtr(), SparseMatrix< _Scalar, _Options, _Index >::_valuePtr(), SparseMatrix< _Scalar, _Options, _Index >::coeffRef(), SparseVector< _Scalar, _Options, _Index >::fill(), SparseMatrix< _Scalar, _Options, _Index >::fill(), SparseVector< _Scalar, _Options, _Index >::insert(), SparseMatrix< _Scalar, _Options, _Index >::insert(), SparseVector< _Scalar, _Options, _Index >::insertBack(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner(), SparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInnerUnordered(), SparseMatrix< _Scalar, _Options, _Index >::operator=(), SparseMatrix< _Scalar, _Options, _Index >::prune(), CompressedStorage< Scalar, Index >::prune(), SparseVector< _Scalar, _Options, _Index >::InnerIterator::value(), and SparseVector< _Scalar, _Options, _Index >::InnerIterator::valueRef().
| const Scalar& CompressedStorage< _Scalar, _Index >::value | ( | size_t | i ) | const [inline] |
Definition at line 116 of file CompressedStorage.h.
size_t CompressedStorage< _Scalar, _Index >::m_allocatedSize [protected] |
Definition at line 235 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::allocatedSize(), CompressedStorage< Scalar, Index >::Map(), CompressedStorage< Scalar, Index >::reallocate(), CompressedStorage< Scalar, Index >::reserve(), CompressedStorage< Scalar, Index >::resize(), CompressedStorage< Scalar, Index >::squeeze(), and CompressedStorage< Scalar, Index >::swap().
Index* CompressedStorage< _Scalar, _Index >::m_indices [protected] |
Definition at line 233 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::append(), CompressedStorage< Scalar, Index >::at(), CompressedStorage< Scalar, Index >::atInRange(), CompressedStorage< Scalar, Index >::atWithInsertion(), CompressedStorage< Scalar, Index >::index(), CompressedStorage< Scalar, Index >::Map(), CompressedStorage< Scalar, Index >::operator=(), CompressedStorage< Scalar, Index >::reallocate(), CompressedStorage< Scalar, Index >::searchLowerIndex(), CompressedStorage< Scalar, Index >::swap(), and CompressedStorage< Scalar, Index >::~CompressedStorage().
size_t CompressedStorage< _Scalar, _Index >::m_size [protected] |
Definition at line 234 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::append(), CompressedStorage< Scalar, Index >::at(), CompressedStorage< Scalar, Index >::atWithInsertion(), CompressedStorage< Scalar, Index >::clear(), CompressedStorage< Scalar, Index >::Map(), CompressedStorage< Scalar, Index >::operator=(), CompressedStorage< Scalar, Index >::reallocate(), CompressedStorage< Scalar, Index >::reserve(), CompressedStorage< Scalar, Index >::resize(), CompressedStorage< Scalar, Index >::searchLowerIndex(), CompressedStorage< Scalar, Index >::size(), CompressedStorage< Scalar, Index >::squeeze(), and CompressedStorage< Scalar, Index >::swap().
Scalar* CompressedStorage< _Scalar, _Index >::m_values [protected] |
Definition at line 232 of file CompressedStorage.h.
Referenced by CompressedStorage< Scalar, Index >::append(), CompressedStorage< Scalar, Index >::at(), CompressedStorage< Scalar, Index >::atInRange(), CompressedStorage< Scalar, Index >::atWithInsertion(), CompressedStorage< Scalar, Index >::Map(), CompressedStorage< Scalar, Index >::operator=(), CompressedStorage< Scalar, Index >::reallocate(), CompressedStorage< Scalar, Index >::swap(), CompressedStorage< Scalar, Index >::value(), and CompressedStorage< Scalar, Index >::~CompressedStorage().
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |