Data structure for two-dimensional mappings that are sparse in the second dimension. More...
#include <ogdf/cluster/sync_plan/basic/RegisteredMultiArray.h>
Public Types | |
using | EntryType = UsuallySmallMap< Key2, Value, array_max > |
Public Member Functions | |
RegisteredMultiArray ()=default | |
RegisteredMultiArray (const RegisteredMultiArray ©)=default | |
RegisteredMultiArray (RegisteredMultiArray &&move) noexcept=default | |
template<class... T> | |
RegisteredMultiArray (T &&... t) | |
bool | contains (const Key1 &k1, const Key2 &k2) const |
size_t | count (const Key1 &k1) const |
EntryType & | get_all (const Key1 &k1) |
const EntryType & | get_all (const Key1 &k1) const |
Value & | get_or_create (const Key1 &k1, const Key2 &k2) |
Value & | get_or_raise (const Key1 &k1, const Key2 &k2) |
const Value & | get_or_raise (const Key1 &k1, const Key2 &k2) const |
bool | has (const Key1 &k1) const |
Value & | operator() (const Key1 &k1, const Key2 &k2) |
RegisteredMultiArray & | operator= (const RegisteredMultiArray ©)=default |
RegisteredMultiArray & | operator= (RegisteredMultiArray &&move) noexcept=default |
void | remove (const Key1 &k1, const Key2 &k2) |
Private Attributes | |
BaseArray< EntryType > | m_array |
Data structure for two-dimensional mappings that are sparse in the second dimension.
This is effectively a RegisteredArray that has two indexing dimensions, the first one uses a regular RegisteredArray, while the second uses UsuallySmallMap as compact representation. We assume that, for most values in the first dimension, there are only very few values in the second dimension. Thus, for most values we only keep the single value in the second dimension or a short std::array through which we can easily seek. If more than array_max
values are stored for a first dimension value, we use a std::map to manage the second dimension for this value.
Definition at line 269 of file RegisteredMultiArray.h.
using ogdf::RegisteredMultiArray< Key1, Key2, Value, BaseArray, array_max >::EntryType = UsuallySmallMap<Key2, Value, array_max> |
Definition at line 271 of file RegisteredMultiArray.h.
|
default |
|
default |
|
defaultnoexcept |
|
inlineexplicit |
Definition at line 279 of file RegisteredMultiArray.h.
|
inline |
Definition at line 297 of file RegisteredMultiArray.h.
|
inline |
Definition at line 299 of file RegisteredMultiArray.h.
|
inline |
Definition at line 291 of file RegisteredMultiArray.h.
|
inline |
Definition at line 293 of file RegisteredMultiArray.h.
|
inline |
Definition at line 283 of file RegisteredMultiArray.h.
|
inline |
Definition at line 285 of file RegisteredMultiArray.h.
|
inline |
Definition at line 287 of file RegisteredMultiArray.h.
|
inline |
Definition at line 301 of file RegisteredMultiArray.h.
|
inline |
Definition at line 281 of file RegisteredMultiArray.h.
|
default |
|
defaultnoexcept |
|
inline |
Definition at line 295 of file RegisteredMultiArray.h.
|
private |
Definition at line 304 of file RegisteredMultiArray.h.