DGtal 2.0.0
|
Public Types | |
typedef Value | ValueType |
Public Member Functions | |
DynArrayXYOfMap (unsigned int _L, unsigned int _X, unsigned int _Y) | |
~DynArrayXYOfMap () | |
size_t | offset (unsigned int x, unsigned int y) const |
void | clear () |
const Value & | value (unsigned int l, unsigned int x, unsigned int y) |
unsigned int | erase (unsigned int l, unsigned int x, unsigned int y) |
void | setValue (const Value &val, unsigned int l, unsigned int x, unsigned int y) |
void | setValueNoNewLabel (const Value &val, unsigned int l, unsigned int x, unsigned int y) |
bool | hasLabel (unsigned int l, unsigned int x, unsigned int y) const |
void | getLabels (std::vector< unsigned int > &labels, unsigned int x, unsigned int y) const |
unsigned int | nbLabels (unsigned int x, unsigned int y) const |
void | display (ostream &, unsigned int, unsigned int, unsigned int) |
unsigned long long | area () const |
Data Fields | |
const unsigned int | L |
const unsigned int | X |
const unsigned int | Y |
Private Types | |
typedef std::map< unsigned int, Value > | MyMap |
typedef MyMap::const_iterator | ConstIterator |
Private Attributes | |
MyMap * | _data |
Array[X][Y] of map<L,Value> Intermediate approach. Slower (between 30% and 40%) than ArrayXYOfLabelledMap and takes 50% to 100% twice as much place.
Note that 4000*4000*16 takes 861Mb. Note that 2000*2000*64 takes 218Mb.
Definition at line 183 of file testMultiMap-benchmark.cpp.
|
private |
Definition at line 185 of file testMultiMap-benchmark.cpp.
|
private |
Definition at line 184 of file testMultiMap-benchmark.cpp.
typedef Value DynArrayXYOfMap< Value >::ValueType |
Definition at line 188 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 198 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 204 of file testMultiMap-benchmark.cpp.
References _data.
|
inline |
Definition at line 269 of file testMultiMap-benchmark.cpp.
References nbLabels(), X, and Y.
|
inline |
Definition at line 215 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 264 of file testMultiMap-benchmark.cpp.
|
inline |
|
inline |
Definition at line 249 of file testMultiMap-benchmark.cpp.
|
inline |
|
inline |
|
inline |
Definition at line 209 of file testMultiMap-benchmark.cpp.
References Y.
Referenced by clear(), erase(), getLabels(), hasLabel(), nbLabels(), setValue(), setValueNoNewLabel(), and value().
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 194 of file testMultiMap-benchmark.cpp.
Referenced by clear(), DynArrayXYOfMap(), erase(), getLabels(), hasLabel(), nbLabels(), setValue(), setValueNoNewLabel(), value(), and ~DynArrayXYOfMap().
const unsigned int DynArrayXYOfMap< Value >::L |
Definition at line 189 of file testMultiMap-benchmark.cpp.
Referenced by DynArrayXYOfMap().
const unsigned int DynArrayXYOfMap< Value >::X |
Definition at line 190 of file testMultiMap-benchmark.cpp.
Referenced by area(), clear(), and DynArrayXYOfMap().
const unsigned int DynArrayXYOfMap< Value >::Y |
Definition at line 191 of file testMultiMap-benchmark.cpp.
Referenced by area(), clear(), DynArrayXYOfMap(), and offset().