pub struct BoxStats {
pub min: f64,
pub q1: f64,
pub median: f64,
pub q3: f64,
pub max: f64,
pub outliers: Vec<f64>,
}Expand description
Five-number summary plus outliers.
Fields§
§min: f64Lower whisker end.
q1: f64First quartile.
median: f64Median.
q3: f64Third quartile.
max: f64Upper whisker end.
outliers: Vec<f64>Points outside the whiskers.
Implementations§
Source§impl BoxStats
impl BoxStats
Sourcepub fn new(min: f64, q1: f64, median: f64, q3: f64, max: f64) -> Self
pub fn new(min: f64, q1: f64, median: f64, q3: f64, max: f64) -> Self
Precomputed statistics (no outliers).
Sourcepub fn outliers(self, o: impl IntoIterator<Item = f64>) -> Self
pub fn outliers(self, o: impl IntoIterator<Item = f64>) -> Self
Add outliers.
Sourcepub fn from_samples(samples: &[f64], k: f64) -> Option<Self>
pub fn from_samples(samples: &[f64], k: f64) -> Option<Self>
Compute from samples with whiskers at k × IQR (non-finite values ignored).
Returns None when there are no finite samples.
Trait Implementations§
impl StructuralPartialEq for BoxStats
Auto Trait Implementations§
impl Freeze for BoxStats
impl RefUnwindSafe for BoxStats
impl Send for BoxStats
impl Sync for BoxStats
impl Unpin for BoxStats
impl UnsafeUnpin for BoxStats
impl UnwindSafe for BoxStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more