pub trait QuantileSketch: Sketch {
type Value: PartialOrd + Clone;
// Required methods
fn add(&mut self, value: Self::Value);
fn quantile(&self, rank: f64) -> Option<Self::Value>;
fn rank(&self, value: &Self::Value) -> f64;
fn min(&self) -> Option<Self::Value>;
fn max(&self) -> Option<Self::Value>;
// Provided methods
fn cdf(&self, value: &Self::Value) -> f64 { ... }
fn median(&self) -> Option<Self::Value> { ... }
fn quantiles(&self, ranks: &[f64]) -> Vec<Option<Self::Value>> { ... }
}Expand description
Quantile estimation sketches
Required Associated Types§
Sourcetype Value: PartialOrd + Clone
type Value: PartialOrd + Clone
The value type being tracked
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.