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