20#ifndef ARRAY_TUPLE_UNION_HPP_
21#define ARRAY_TUPLE_UNION_HPP_
25#include "array_tuple_sketch.hpp"
27#include "tuple_union.hpp"
32template<
typename Array>
33struct default_array_tuple_union_policy {
34 default_array_tuple_union_policy(uint8_t num_values = 1): num_values_(num_values) {}
36 void operator()(Array& array,
const Array& other)
const {
37 for (uint8_t i = 0; i < num_values_; ++i) {
41 uint8_t get_num_values()
const {
52 typename Allocator =
typename Array::allocator_type
54class array_tuple_union:
public tuple_union<Array, Policy, Allocator> {
56 using value_type =
typename Array::value_type;
57 using Base = tuple_union<Array, Policy, Allocator>;
69 template<
typename FwdSketch>
72 CompactSketch get_result(
bool ordered =
true)
const;
76 array_tuple_union(uint8_t lg_cur_size, uint8_t lg_nom_size, resize_factor rf,
float p, uint64_t theta, uint64_t seed,
const Policy& policy,
const Allocator& allocator);
79template<
typename Array,
typename Policy,
typename Allocator>
82 builder(
const Policy& policy = Policy(),
const Allocator& allocator = Allocator());
88#include "array_tuple_union_impl.hpp"
array tuple union
Definition array_tuple_union.hpp:54
void update(FwdSketch &&sketch)
Update the union with a given sketch.
Definition array_tuple_union_impl.hpp:32
Compact array tuple sketch.
Definition array_tuple_sketch.hpp:194
Tuple base builder.
Definition tuple_sketch.hpp:655
datasketches::resize_factor resize_factor
hash table resize factor
Definition theta_constants.hpp:31
DataSketches namespace.
Definition binomial_bounds.hpp:38
default array tuple union policy
Definition array_tuple_union.hpp:33