template<typename K, typename V, Int GROUP_BITS = 4, Int BUCKET_SIZE = 16, BURSTTRIE_SORT SORT = BURSTTRIE_SORT::LINEAR_SEARCH, template< typename, typename > class POOL = PointerBurstTriePool>
class maxon::BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >
A BurstTrieMap maps unsigned integral keys to values using three levels:
- At first, keys are divided based on their number of leading zero bits.
 
- Then, a tree is traversed using groups of GROUP_BITS bits as indices into child nodes.
 
- Finally, a leaf node contains a small array-map-like map of at most BUCKET_SIZE entries. When a full leaf node (BUCKET_SIZE entries) needs to get a further entry, it is split into an inner node with children. Likewise, if after erasure an inner node has less than two-thirds of BUCKET_SIZE key-value-pairs in its descendants, those pairs will be combined to a single leaf node which then replaces the inner node and its descendants.
 
Performance characteristics: Like an ArrayMap, a BurstTrieMap allows an iteration in the order of the keys. But it performs much better than an ArrayMap when the number of entries gets large (say, more than 100): The number of inner nodes to visit is bounded by the maximum bit length of a key, so operations like insertion, erasure or searching are bounded by a constant time cost, too: O(1).
See HashMap for more examples on how to use maps in general.
- Template Parameters
 - 
  
    | K | Type of keys. This must be an unsigned integral type.  | 
    | V | Type of values.  | 
    | GROUP_BITS | Number of bits which shall be grouped to form an index into the children array of an inner node. This shouldn't exceed 4.  | 
    | BUCKET_SIZE | Maximum size of a bucket of a leaf node. Reasonable values are between 4 and 40.  | 
    | SORT | Mode for sorting of the buckets.  | 
    | POOL | Memory pool for the nodes.  | 
  
   
- See also
 - $ref maps 
 
 | 
| using  | IsBurstTrieMap = std::true_type | 
|   | 
| using  | Bucket = BurstTrieBucket< K, V, BUCKET_SIZE > | 
|   | 
| using  | Node = BurstTrieNode< GROUP_BITS, typename POOL< Int, Int >::Index > | 
|   | 
| using  | Pool = POOL< Node, Bucket > | 
|   | 
| using  | Index = typename Pool::Index | 
|   | 
| using  | Super = MapBase< BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >, K, V, Pool, DefaultCompare > | 
|   | 
| using  | Iterator = IteratorTemplate< false, EntryIteratorBase > | 
|   | 
| using  | ConstIterator = IteratorTemplate< true, EntryIteratorBase > | 
|   | 
| using  | KeyIterator = IteratorTemplate< false, KeyIteratorBase > | 
|   | 
| using  | ConstKeyIterator = IteratorTemplate< true, KeyIteratorBase > | 
|   | 
| using  | ValueIterator = IteratorTemplate< false, ValueIteratorBase > | 
|   | 
| using  | ConstValueIterator = IteratorTemplate< true, ValueIteratorBase > | 
|   | 
| using  | MapType = BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL > | 
|   | 
| using  | Super = BaseCollection< BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >, POOL< BurstTrieNode< GROUP_BITS, POOL< Int, Int >::Index >, BurstTrieBucket< K, V, BUCKET_SIZE > > > | 
|   | 
| using  | KeyType = K | 
|   | 
| using  | ValueType = V | 
|   | 
| using  | IsCollection = std::true_type | 
|   | 
 | 
|   | BurstTrieMap () | 
|   | 
|   | BurstTrieMap (Pool &&a) | 
|   | 
|   | BurstTrieMap (const Pool &a) | 
|   | 
|   | BurstTrieMap (BurstTrieMap &&src) | 
|   | 
|   | MAXON_OPERATOR_MOVE_ASSIGNMENT (BurstTrieMap) | 
|   | 
|   | ~BurstTrieMap () | 
|   | 
| template<typename MAP >  | 
| SFINAEHelper< Result< void >, typename std::remove_reference< MAP >::type::IsBurstTrieMap >::type  | CopyFromImpl (MAP &&src, COLLECTION_RESIZE_FLAGS resizeFlags, OverloadRank1) | 
|   | 
| void  | Reset () | 
|   | 
| void  | Flush () | 
|   | 
| ResultMem  | SetCapacityHint (Int, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) | 
|   | 
| Int  | GetCount () const | 
|   | 
| Int  | GetOperationCountForSearch () const | 
|   | 
| Int  | GetDepth () const | 
|   | 
| Int  | GetMemorySize () const | 
|   | 
| Iterator  | Begin () | 
|   | 
| Iterator  | End () | 
|   | 
| ConstIterator  | Begin () const | 
|   | 
| ConstIterator  | End () const | 
|   | 
| KeyIterator  | GetKeys () | 
|   | 
| ConstKeyIterator  | GetKeys () const | 
|   | 
| ValueIterator  | GetValues () | 
|   | 
| ConstValueIterator  | GetValues () const | 
|   | 
| ResultMemT< Iterator >  | InsertEntry (K key, Bool &created=BoolLValue()) | 
|   | 
| ResultMemT< Iterator >  | Insert (K key, const V &value, Bool &created=BoolLValue()) | 
|   | 
| ResultMemT< Iterator >  | Insert (K key, V &&value, Bool &created=BoolLValue()) | 
|   | 
| ResultRef< V >  | InsertKey (K key, Bool &created=BoolLValue()) | 
|   | 
| const V *  | FindValue (K key) const | 
|   | 
| V *  | FindValue (K key) | 
|   | 
| Iterator  | Find (K key) | 
|   | 
| ConstIterator  | Find (K key) const | 
|   | 
| Iterator  | FindFloor (K key) | 
|   | 
| ConstIterator  | FindFloor (K key) const | 
|   | 
| ResultOk< Bool >  | Erase (K key) | 
|   | 
| template<template< Bool > class SUPER>  | 
| MAXON_WARN_UNUSED IteratorTemplate< false, SUPER >  | Erase (const IteratorTemplate< false, SUPER > &position, Int eraseCnt=1) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE  | MapBase (ARGS &&... args) | 
|   | 
| MapImpl< BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL > & >  | ToMap () | 
|   | 
| MapImpl< const BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL > & >  | ToMap () const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE  | operator MapImpl< BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL > & > () | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE  | operator MapImpl< const BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL > & > () const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE  | MapBase0 (ARGS &&... args) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Bool  | Contains (typename ByValueParam< K >::type key) const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE SFINAEHelper< Bool, typename PAIR::KeyType >::type  | Contains (const PAIR &pair) const | 
|   | 
| ResultRef< V >  | Append (const K &key) | 
|   | 
| SFINAEHelper< ResultRef< V >, typename PAIR::KeyType >::type  | Append (const PAIR &pair) | 
|   | 
| Result< void >  | Add (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) | 
|   | 
| Result< void >  | AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) | 
|   | 
| Result< void >  | AppendAllInverse (COLLECTION2 &&other) | 
|   | 
| Bool  | ContainsAllImpl (COLLECTION2 &&other, OverloadRank0) const | 
|   | 
| Result< void >  | SubtractImpl (COLLECTION2 &&other, OverloadRank0) | 
|   | 
| Bool  | IsEqualImpl (const COLLECTION2 &other, COMPARE &&cmp, OverloadRank0) const | 
|   | 
| UInt  | GetHashCode () const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE  | BaseCollection (ARGS &&... args) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< maxon::IsCollection< COLLECTION2 >::value, Bool >::type  | operator== (const COLLECTION2 &other) const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< maxon::IsCollection< COLLECTION2 >::value, Bool >::type  | operator!= (const COLLECTION2 &other) const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< maxon::IsCollection< COLLECTION2 >::value &&!std::is_same< typename std::decay< COMPARE >::type, EQUALITY >::value, Bool >::type  | IsEqual (const COLLECTION2 &other, COMPARE &&cmp=COMPARE()) const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Result< void >  | AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Result< void >  | CopyFrom (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Result< void >  | Subtract (COLLECTION2 &&other) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Result< void >  | Intersect (const COLLECTION2 &other) | 
|   | 
| Bool  | Intersects (const COLLECTION2 &other) const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Result< void >  | CopyFromImpl (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags, OverloadRank0) | 
|   | 
| Result< void >  | AppendAllImpl (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags, Bool overwrite, OverloadRank0) | 
|   | 
| Result< void >  | IntersectImpl (COLLECTION2 &&other, OverloadRank0) | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Bool  | IsEmpty () const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Bool  | IsPopulated () const | 
|   | 
| String  | ToString (const FormatStatement *formatStatement) const | 
|   | 
| MAXON_ATTRIBUTE_FORCE_INLINE Bool  | ContainsAll (COLLECTION2 &&other) const | 
|   | 
| Bool  | ContainsAllImpl (COLLECTION2 &&other, OverloadRank0) const | 
|   |