pub struct Quartiles {
pub min: f64,
pub q1: f64,
pub median: f64,
pub q3: f64,
pub max: f64,
pub lower_fence: f64,
pub upper_fence: f64,
pub outliers: Vec<f64>,
}Expand description
Five-number summary + the 1.5·IQR whisker fences and the points beyond them.
Fields§
§min: f64§q1: f64§median: f64§q3: f64§max: f64§lower_fence: f64Lower whisker end: smallest datum ≥ q1 - 1.5·IQR.
upper_fence: f64Upper whisker end: largest datum ≤ q3 + 1.5·IQR.
outliers: Vec<f64>Points outside the fences.
Implementations§
Source§impl Quartiles
impl Quartiles
Sourcepub fn compute(values: &[f64]) -> Option<Self>
pub fn compute(values: &[f64]) -> Option<Self>
Compute from an arbitrary (unsorted) sample. Empty input → None.
Sourcepub fn from_sorted(v: &[f64]) -> Self
pub fn from_sorted(v: &[f64]) -> Self
Compute from an already-sorted, finite, non-empty slice. Uses linear
interpolation between order statistics (the “type-7”/numpy default), so
it matches what analysts expect from Plotly/pandas.
Trait Implementations§
impl StructuralPartialEq for Quartiles
Auto Trait Implementations§
impl Freeze for Quartiles
impl RefUnwindSafe for Quartiles
impl Send for Quartiles
impl Sync for Quartiles
impl Unpin for Quartiles
impl UnsafeUnpin for Quartiles
impl UnwindSafe for Quartiles
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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