Public Member Functions |
| ArrayXYOfLabelledMap () |
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 |
template<typename Value, unsigned int L, unsigned int X, unsigned int Y, typename TWord, unsigned int N, unsigned int M>
class ArrayXYOfLabelledMap< Value, L, X, Y, TWord, N, M >
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 417 of file testLabelledMap-benchmark.cpp.