Status: Ready
Unified enum wrapper for sketch payloads used by EH-style frameworks.
enum EHSketchList {
CM(CountMin<Vector2D<i32>, FastPath>),
CS(Count<Vector2D<i32>, FastPath>),
COUNTL2HH(CountL2HH),
HLL(HyperLogLog<ErtlMLE>),
KLL(KLL),
DDS(DDSketch),
COCO(Coco),
ELASTIC(Elastic),
UNIFORM(UniformSampling),
UNIVMON(UnivMon),
}Enum-based; construct by variant.
fn insert(&mut self, val: &DataInput)fn query(&self, key: &DataInput) -> Result<f64, &'static str>
fn supports_norm(&self, norm: SketchNorm) -> bool
fn sketch_type(&self) -> &'static strfn merge(&mut self, other: &EHSketchList) -> Result<(), &'static str>Serialized through serde as part of parent structures.
use asap_sketchlib::{CountMin, EHSketchList, FastPath, DataInput, Vector2D};
let mut sk = EHSketchList::CM(CountMin::<Vector2D<i32>, FastPath>::default());
sk.insert(&DataInput::U64(1));
let _ = sk.query(&DataInput::U64(1));- Some variant paths still contain
todo!()branches in input conversion. - Some merge/query variant combinations are intentionally unsupported.
Core wrapper in EH and optimized window frameworks.