|
DGtal 2.0.0
|
Public Types | |
| typedef Value | ValueType |
Public Member Functions | |
| DynArrayXYOfLabelledMap (unsigned int _X, unsigned int _Y) | |
| ~DynArrayXYOfLabelledMap () | |
| size_t | offset (unsigned int x, unsigned int y) const |
| void | clear () |
| const Value & | value (unsigned int l, unsigned int x, unsigned int y) const |
| void | setValue (const Value &val, unsigned int l, unsigned int x, unsigned int y) |
| unsigned int | erase (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 x, unsigned int y) |
| unsigned long long | area () const |
Data Fields | |
| const unsigned int | X |
| const unsigned int | Y |
Private Types | |
| typedef LabelledMap< Value, L, TWord, N, M > | MyLabelledMap |
Private Attributes | |
| MyLabelledMap * | _data |
Array[X][Y] of LabelledMap<L>
The proposed alternative to the brute-force approach. Generally less than 10 times the memory used by brute force for L >= 16. Approximately 50% slower in most operations, except initialization or used of all labels. In this case outperforms Array[L][X][Y].
Note that 4000*4000*16 is fine on my 8Gb laptop (529Mb). Note that 2000*2000*64 takes 133Mb.
Definition at line 478 of file testMultiMap-benchmark.cpp.
|
private |
Definition at line 479 of file testMultiMap-benchmark.cpp.
| typedef Value DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::ValueType |
Definition at line 481 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 490 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 496 of file testMultiMap-benchmark.cpp.
References _data.
|
inline |
Definition at line 562 of file testMultiMap-benchmark.cpp.
References nbLabels(), X, and Y.
|
inline |
Definition at line 507 of file testMultiMap-benchmark.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 501 of file testMultiMap-benchmark.cpp.
References Y.
Referenced by clear(), display(), erase(), getLabels(), hasLabel(), nbLabels(), setValue(), setValueNoNewLabel(), and value().
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 486 of file testMultiMap-benchmark.cpp.
Referenced by clear(), display(), DynArrayXYOfLabelledMap(), erase(), getLabels(), hasLabel(), nbLabels(), setValue(), setValueNoNewLabel(), value(), and ~DynArrayXYOfLabelledMap().
| const unsigned int DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::X |
Definition at line 482 of file testMultiMap-benchmark.cpp.
Referenced by area(), clear(), and DynArrayXYOfLabelledMap().
| const unsigned int DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::Y |
Definition at line 483 of file testMultiMap-benchmark.cpp.
Referenced by area(), clear(), DynArrayXYOfLabelledMap(), and offset().