20 #ifndef THETA_UNION_HPP_
21 #define THETA_UNION_HPP_
24 #include "theta_sketch.hpp"
25 #include "theta_union_base.hpp"
30 template<
typename A>
class theta_union_alloc;
33 using theta_union = theta_union_alloc<std::allocator<uint64_t>>;
39 template<
typename Allocator = std::allocator<u
int64_t>>
42 using Entry = uint64_t;
43 using ExtractKey = trivial_extract_key;
50 void operator()(uint64_t internal_entry, uint64_t incoming_entry)
const {
51 unused(internal_entry);
52 unused(incoming_entry);
55 using State = theta_union_base<Entry, ExtractKey, nop_policy, Sketch, CompactSketch, Allocator>;
64 template<
typename FwdSketch>
65 void update(FwdSketch&& sketch);
81 theta_union_alloc(uint8_t lg_cur_size, uint8_t lg_nom_size, resize_factor rf,
float p, uint64_t theta, uint64_t seed,
const Allocator& allocator);
88 builder(
const A& allocator = A());
99 #include "theta_union_impl.hpp"
Compact Theta sketch.
Definition: theta_sketch.hpp:359
Theta base builder.
Definition: theta_update_sketch_base.hpp:97
Base class for the Theta Sketch, a generalization of the Kth Minimum Value (KMV) sketch.
Definition: theta_sketch.hpp:127
Theta union builder.
Definition: theta_union.hpp:86
Theta Union.
Definition: theta_union.hpp:40
CompactSketch get_result(bool ordered=true) const
Produces a copy of the current state of the union as a compact sketch.
Definition: theta_union_impl.hpp:37
void update(FwdSketch &&sketch)
Update the union with a given sketch.
Definition: theta_union_impl.hpp:32
void reset()
Reset the union to the initial empty state.
Definition: theta_union_impl.hpp:42
datasketches::resize_factor resize_factor
hash table resize factor
Definition: theta_constants.hpp:31
DataSketches namespace.
Definition: binomial_bounds.hpp:38