pub struct Centroid {
pub mean: f64,
pub weight: f64,
}Expand description
Represents a centroid in the t-digest, which holds a mean value and an associated weight.
§Examples
use tdigests::Centroid;
let centroid = Centroid::new(10.0, 5.0);
assert_eq!(centroid.mean, 10.0);
assert_eq!(centroid.weight, 5.0);Fields§
§mean: f64The mean value of the centroid.
weight: f64The weight (number of observations) associated with the centroid.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Centroid
Auto Trait Implementations§
impl Freeze for Centroid
impl RefUnwindSafe for Centroid
impl Send for Centroid
impl Sync for Centroid
impl Unpin for Centroid
impl UnwindSafe for Centroid
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)