[−][src]Struct sketches_ddsketch::DDSketch
This struct represents a DDSketch
Implementations
impl DDSketch
[src]
pub fn new(config: Config) -> Self
[src]
Construct a DDSketch
. Requires a Config
specifying the parameters of the sketch
pub fn add(&mut self, v: f64)
[src]
Add the sample to the sketch
pub fn quantile(&self, q: f64) -> Result<Option<f64>, DDSketchError>
[src]
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.
pub fn min(&self) -> Option<f64>
[src]
Returns the minimum value seen, or None if sketch is empty
pub fn max(&self) -> Option<f64>
[src]
Returns the maximum value seen, or None if sketch is empty
pub fn sum(&self) -> Option<f64>
[src]
Returns the sum of values seen, or None if sketch is empty
pub fn count(&self) -> usize
[src]
Returns the number of values added to the sketch
pub fn length(&self) -> usize
[src]
Returns the length of the underlying Store
. This is mainly only useful for understanding
how much the sketch has grown given the inserted values.
pub fn merge(&mut self, o: &DDSketch) -> Result<(), DDSketchError>
[src]
Merge the contents of another sketch into this one. The sketch that is merged into this one is unchanged after the merge.
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,