#pragma once
#include <cstdint>
#include <memory>
#include "rust/cxx.h"
#include "array_of_doubles_sketch.hpp"
#include "array_of_doubles_sketch_shim.h"
#include "array_of_doubles_compact_shim.h"
namespace apache_datasketches_rs {
using aod_intersection =
datasketches::array_of_doubles_intersection<datasketches::default_array_of_doubles_union_policy>;
class ArrayOfDoublesIntersectionShim {
public:
explicit ArrayOfDoublesIntersectionShim(uint8_t num_values);
void update_with_sketch(const ArrayOfDoublesSketchShim& sketch);
void update_with_compact(const CompactArrayOfDoublesSketchShim& sketch);
std::unique_ptr<CompactArrayOfDoublesSketchShim> get_result(bool ordered) const;
bool has_result() const;
private:
aod_intersection intersection_;
};
std::unique_ptr<ArrayOfDoublesIntersectionShim> new_array_of_doubles_intersection(uint8_t num_values);
}