Struct tdigest_ch::Quantiles
source · pub struct Quantiles<'a> { /* private fields */ }
Expand description
Implementations§
source§impl<'a> Quantiles<'a>
impl<'a> Quantiles<'a>
sourcepub fn get(&self, level: f64) -> f32
pub fn get(&self, level: f64) -> f32
Returns the estimated quantile of the t-digest.
§Examples
use tdigest_ch::TDigest;
let mut digest = TDigest::from([1.0, 2.0, 3.0, 4.0, 5.0]);
let quantiles = digest.quantiles();
assert_eq!(quantiles.get(0.0), 1.0);
assert_eq!(quantiles.get(0.5), 3.0);
assert_eq!(quantiles.get(1.0), 5.0);
Auto Trait Implementations§
impl<'a> Freeze for Quantiles<'a>
impl<'a> RefUnwindSafe for Quantiles<'a>
impl<'a> Send for Quantiles<'a>
impl<'a> Sync for Quantiles<'a>
impl<'a> Unpin for Quantiles<'a>
impl<'a> UnwindSafe for Quantiles<'a>
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