Struct sketches_ddsketch::DDSketch
source · pub struct DDSketch { /* private fields */ }
Expand description
This struct represents a DDSketch
Implementations§
source§impl DDSketch
impl DDSketch
sourcepub fn new(config: Config) -> Self
pub fn new(config: Config) -> Self
Construct a DDSketch
. Requires a Config
specifying the parameters of the sketch
sourcepub fn quantile(&self, q: f64) -> Result<Option<f64>, DDSketchError>
pub fn quantile(&self, q: f64) -> Result<Option<f64>, DDSketchError>
Return the quantile value for quantiles between 0.0 and 1.0. Result is an error, represented as DDSketchError::Quantile if the requested quantile is outside of that range.
If the sketch is empty the result is None, else Some(v) for the quantile value.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DDSketch
impl Send for DDSketch
impl Sync for DDSketch
impl Unpin for DDSketch
impl UnwindSafe for DDSketch
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more