From eb54603ddd4fb9fc255372c7904dc0dd6a162968 Mon Sep 17 00:00:00 2001
From: Dmitri Gribenko Config
parameter to the ValueMap template.
-MultiImplMap is map that has two modes, one for small amount of elements and -one for big amount. User should set map implementation for both of them. -User also should set the maximum possible number of elements for small mode. -
- -
-If user want to use MultiImplMap instead of
-DenseMap, he should pass template parameter
-DenseMapCompatible = true. Note, that in this case map implementations
-should present additional DenseMap specific methods (see below):
-isPointerIntoBucketsArray
, getPointerIntoBucketsArray
-and FindAndConstruct
.
-
-Initially MultiImplMap uses small mode and small map implementation. It -triggered to the big mode when the number of contained elements exceeds -maximum possible elements for small mode. -
- --FlatArrayMap optimized for small amount of elements. It uses flat array -implementation inside: -
-[ key0, value0, key1, value1, ... keyN, valueN ]- - -
-User should pass key type, mapped type (type of value), and maximum -number of elements. -
- --After maximum number of elements is reached, map declines any further -attempts to insert new elements ("insert" method returns <end(), -false>). -
- --FlatArrayMap has interface that is compatible with -DenseMap, so user can replace it with DenseMap -without any code changing and vice versa. -
- --SmallMap is wrapper around MultiImplMap. -It uses FlatArrayMap for small mode, and -DenseMap for big mode. -
- -