#ifndef DATASKETCHES_WRAPPER_H
#define DATASKETCHES_WRAPPER_H
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void* kll_float_sketch_t;
typedef void* kll_double_sketch_t;
kll_float_sketch_t kll_float_sketch_new(void);
kll_float_sketch_t kll_float_sketch_new_with_k(uint16_t k);
kll_float_sketch_t kll_float_sketch_copy(kll_float_sketch_t sketch);
void kll_float_sketch_delete(kll_float_sketch_t sketch);
void kll_float_sketch_update(kll_float_sketch_t sketch, float value);
void kll_float_sketch_merge(kll_float_sketch_t sketch, kll_float_sketch_t other);
bool kll_float_sketch_is_empty(kll_float_sketch_t sketch);
uint16_t kll_float_sketch_get_k(kll_float_sketch_t sketch);
uint64_t kll_float_sketch_get_n(kll_float_sketch_t sketch);
uint32_t kll_float_sketch_get_num_retained(kll_float_sketch_t sketch);
bool kll_float_sketch_is_estimation_mode(kll_float_sketch_t sketch);
float kll_float_sketch_get_min_value(kll_float_sketch_t sketch);
float kll_float_sketch_get_max_value(kll_float_sketch_t sketch);
float kll_float_sketch_get_quantile(kll_float_sketch_t sketch, double fraction);
double kll_float_sketch_get_rank(kll_float_sketch_t sketch, float value);
uint8_t* kll_float_sketch_serialize(kll_float_sketch_t sketch, size_t* size);
kll_float_sketch_t kll_float_sketch_deserialize(const uint8_t* data, size_t size);
void kll_float_sketch_get_quantiles(kll_float_sketch_t sketch,
const double* fractions, size_t num_fractions,
float* results);
void kll_float_sketch_get_quantiles_evenly_spaced(kll_float_sketch_t sketch,
uint32_t num, float* results);
kll_double_sketch_t kll_double_sketch_new(void);
kll_double_sketch_t kll_double_sketch_new_with_k(uint16_t k);
kll_double_sketch_t kll_double_sketch_copy(kll_double_sketch_t sketch);
void kll_double_sketch_delete(kll_double_sketch_t sketch);
void kll_double_sketch_update(kll_double_sketch_t sketch, double value);
void kll_double_sketch_merge(kll_double_sketch_t sketch, kll_double_sketch_t other);
bool kll_double_sketch_is_empty(kll_double_sketch_t sketch);
uint16_t kll_double_sketch_get_k(kll_double_sketch_t sketch);
uint64_t kll_double_sketch_get_n(kll_double_sketch_t sketch);
uint32_t kll_double_sketch_get_num_retained(kll_double_sketch_t sketch);
bool kll_double_sketch_is_estimation_mode(kll_double_sketch_t sketch);
double kll_double_sketch_get_min_value(kll_double_sketch_t sketch);
double kll_double_sketch_get_max_value(kll_double_sketch_t sketch);
double kll_double_sketch_get_quantile(kll_double_sketch_t sketch, double fraction);
double kll_double_sketch_get_rank(kll_double_sketch_t sketch, double value);
uint8_t* kll_double_sketch_serialize(kll_double_sketch_t sketch, size_t* size);
kll_double_sketch_t kll_double_sketch_deserialize(const uint8_t* data, size_t size);
void kll_double_sketch_get_quantiles(kll_double_sketch_t sketch,
const double* fractions, size_t num_fractions,
double* results);
void kll_double_sketch_get_quantiles_evenly_spaced(kll_double_sketch_t sketch,
uint32_t num, double* results);
#ifdef __cplusplus
}
#endif
#endif