20 #ifndef _AUXHASHMAP_HPP_
21 #define _AUXHASHMAP_HPP_
27 #include "coupon_iterator.hpp"
32 class AuxHashMap final {
34 AuxHashMap(uint8_t lgAuxArrInts, uint8_t lgConfigK,
const A& allocator);
35 static AuxHashMap* newAuxHashMap(uint8_t lgAuxArrInts, uint8_t lgConfigK,
const A& allocator);
36 static AuxHashMap* newAuxHashMap(
const AuxHashMap<A>& that);
38 static AuxHashMap* deserialize(
const void* bytes,
size_t len,
40 uint32_t auxCount, uint8_t lgAuxArrInts,
41 bool srcCompact,
const A& allocator);
42 static AuxHashMap* deserialize(std::istream& is, uint8_t lgConfigK,
43 uint32_t auxCount, uint8_t lgAuxArrInts,
44 bool srcCompact,
const A& allocator);
45 virtual ~AuxHashMap() =
default;
46 static std::function<void(AuxHashMap<A>*)> make_deleter();
48 AuxHashMap* copy()
const;
49 uint32_t getUpdatableSizeBytes()
const;
50 uint32_t getCompactSizeBytes()
const;
52 uint32_t getAuxCount()
const;
53 uint32_t* getAuxIntArr();
54 uint8_t getLgAuxArrInts()
const;
56 coupon_iterator<A> begin(
bool all =
false)
const;
57 coupon_iterator<A> end()
const;
59 void mustAdd(uint32_t slotNo, uint8_t value);
60 uint8_t mustFindValueFor(uint32_t slotNo)
const;
61 void mustReplace(uint32_t slotNo, uint8_t value);
64 typedef typename std::allocator_traits<A>::template rebind_alloc<AuxHashMap<A>> ahmAlloc;
66 using vector_int = std::vector<uint32_t, typename std::allocator_traits<A>::template rebind_alloc<uint32_t>>;
69 static int32_t find(
const uint32_t* auxArr, uint8_t lgAuxArrInts, uint8_t lgConfigK, uint32_t slotNo);
74 const uint8_t lgConfigK;
82 #include "AuxHashMap-internal.hpp"
DataSketches namespace.
Definition: binomial_bounds.hpp:38