DGtal
0.6.devel
|
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 &out, unsigned int l, 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 481 of file testMultiMap-benchmark.cpp.
|
private |
Definition at line 482 of file testMultiMap-benchmark.cpp.
typedef Value DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::ValueType |
Definition at line 484 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 493 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 499 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 565 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 510 of file testMultiMap-benchmark.cpp.
References DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::clear().
Referenced by DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::clear().
|
inline |
Definition at line 559 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 530 of file testMultiMap-benchmark.cpp.
|
inline |
|
inline |
Definition at line 542 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 555 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 504 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 524 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 536 of file testMultiMap-benchmark.cpp.
|
inline |
Definition at line 518 of file testMultiMap-benchmark.cpp.
|
private |
Definition at line 489 of file testMultiMap-benchmark.cpp.
const unsigned int DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::X |
Definition at line 485 of file testMultiMap-benchmark.cpp.
const unsigned int DynArrayXYOfLabelledMap< Value, L, TWord, N, M >::Y |
Definition at line 486 of file testMultiMap-benchmark.cpp.