DGtal 2.1.0
|
Public Member Functions | |
ArrayXYOfMap () | |
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 |
Private Types | |
typedef std::map< unsigned int, Value > | MyMap |
typedef MyMap::const_iterator | ConstIterator |
Private Attributes | |
MyMap | _data [X][Y] |
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 161 of file testLabelledMap-benchmark.cpp.
|
private |
Definition at line 163 of file testLabelledMap-benchmark.cpp.
|
private |
Definition at line 162 of file testLabelledMap-benchmark.cpp.
|
inline |
Definition at line 168 of file testLabelledMap-benchmark.cpp.
|
inline |
Definition at line 226 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::nbLabels().
|
inline |
Definition at line 173 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data, and ArrayXYOfMap< Value, L, X, Y >::clear().
Referenced by ArrayXYOfMap< Value, L, X, Y >::clear().
|
inline |
Definition at line 221 of file testLabelledMap-benchmark.cpp.
|
inline |
Definition at line 186 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
|
inline |
Definition at line 207 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
|
inline |
Definition at line 202 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
|
inline |
Definition at line 216 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
Referenced by ArrayXYOfMap< Value, L, X, Y >::area().
|
inline |
Definition at line 192 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
|
inline |
Definition at line 197 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
|
inline |
Definition at line 181 of file testLabelledMap-benchmark.cpp.
References ArrayXYOfMap< Value, L, X, Y >::_data.
|
private |
Definition at line 164 of file testLabelledMap-benchmark.cpp.
Referenced by ArrayXYOfMap< Value, L, X, Y >::clear(), ArrayXYOfMap< Value, L, X, Y >::erase(), ArrayXYOfMap< Value, L, X, Y >::getLabels(), ArrayXYOfMap< Value, L, X, Y >::hasLabel(), ArrayXYOfMap< Value, L, X, Y >::nbLabels(), ArrayXYOfMap< Value, L, X, Y >::setValue(), ArrayXYOfMap< Value, L, X, Y >::setValueNoNewLabel(), and ArrayXYOfMap< Value, L, X, Y >::value().