DGtal 2.0.0
|
Public Member Functions | |
ArrayXYOfList () | |
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::pair< DGtal::uint16_t, Value > | MyPair |
typedef std::forward_list< MyPair > | MyList |
typedef MyList::iterator | Iterator |
typedef MyList::const_iterator | ConstIterator |
Private Attributes | |
MyList | _data [X][Y] |
Array[X][Y] of forward_list< pair<L,Value> > Another intermediate approach which favors less memory and more computation time.
Approximately same memory usage or 20% more as LabelledMap (for good values of N and M). Approximately 2 to 4 times slower than LabelledMap for most operations.
Note that 2000*2000*32 takes 216Mb.
Definition at line 256 of file testLabelledMap-benchmark.cpp.
|
private |
Definition at line 260 of file testLabelledMap-benchmark.cpp.
|
private |
Definition at line 259 of file testLabelledMap-benchmark.cpp.
|
private |
Definition at line 258 of file testLabelledMap-benchmark.cpp.
|
private |
Definition at line 257 of file testLabelledMap-benchmark.cpp.
|
inline |
Definition at line 265 of file testLabelledMap-benchmark.cpp.
|
inline |
Definition at line 379 of file testLabelledMap-benchmark.cpp.
References nbLabels().
|
inline |
Definition at line 270 of file testLabelledMap-benchmark.cpp.
References _data, and clear().
Referenced by clear().
|
inline |
Definition at line 374 of file testLabelledMap-benchmark.cpp.
|
inline |
Definition at line 291 of file testLabelledMap-benchmark.cpp.
References _data.
|
inline |
Definition at line 352 of file testLabelledMap-benchmark.cpp.
References _data.
|
inline |
|
inline |
|
inline |
Definition at line 309 of file testLabelledMap-benchmark.cpp.
References _data.
|
inline |
Definition at line 325 of file testLabelledMap-benchmark.cpp.
References _data.
|
inline |
Definition at line 278 of file testLabelledMap-benchmark.cpp.
References _data.
|
private |
Definition at line 261 of file testLabelledMap-benchmark.cpp.
Referenced by clear(), erase(), getLabels(), hasLabel(), nbLabels(), setValue(), setValueNoNewLabel(), and value().