#pragma once
#include <cstdint>
#include <memory>
#include "rust/cxx.h"
#include "hll.hpp"
#include "hll_sketch_shim.h"
namespace apache_datasketches_rs {
class HllUnionShim {
public:
explicit HllUnionShim(uint8_t lg_max_k);
void update_sketch(const HllSketchShim& sketch);
void update_u64(uint64_t value);
void update_i64(int64_t value);
void update_f64(double value);
void update_str(rust::Str value);
void update_bytes(rust::Slice<const uint8_t> value);
std::unique_ptr<HllSketchShim> get_result(TargetHllType tgt_type) const;
rust::Vec<uint8_t> serialize_compact(TargetHllType tgt_type) const;
rust::Vec<uint8_t> serialize_updatable(TargetHllType tgt_type) const;
double get_estimate() const;
double get_lower_bound(uint8_t num_std_dev) const;
double get_upper_bound(uint8_t num_std_dev) const;
bool is_empty() const;
void reset();
private:
datasketches::hll_union u_;
};
std::unique_ptr<HllUnionShim> new_hll_union(uint8_t lg_max_k);
}