pub struct Quartiles {
pub lower_whisker: f64,
pub lower_quartile: f64,
pub median: f64,
pub upper_quartile: f64,
pub upper_whisker: f64,
}Expand description
Stores the whisker positions, quartiles and median.
Fields§
§lower_whisker: f64§lower_quartile: f64§median: f64§upper_quartile: f64§upper_whisker: f64Implementations§
Source§impl Quartiles
impl Quartiles
Sourcepub fn new(
lower_whisker: f64,
lower_quartile: f64,
median: f64,
upper_quartile: f64,
upper_whisker: f64,
) -> Self
pub fn new( lower_whisker: f64, lower_quartile: f64, median: f64, upper_quartile: f64, upper_whisker: f64, ) -> Self
Constructs a new Quartiles instance.
Sourcepub fn new_min_max(values: &[f64]) -> Self
pub fn new_min_max(values: &[f64]) -> Self
Constructs a new Quartiles instance where whiskers are calculated as the minimum and maximum value. Use Quartiles::new_min_max_from_sorted if the data is already sorted.
Sourcepub fn new_min_max_from_sorted(values: &[f64]) -> Self
pub fn new_min_max_from_sorted(values: &[f64]) -> Self
Constructs a new Quartiles instance where whiskers are calculated as the minimum and maximum value.
Sourcepub fn new_iqr(values: &[f64]) -> Self
pub fn new_iqr(values: &[f64]) -> Self
Constructs a new Quartiles instance where whiskers are calculated using interquartile range (https://en.wikipedia.org/wiki/Interquartile_range). Use Quartiles::new_iqr_from_sorted if the data is already sorted.
Sourcepub fn new_iqr_from_sorted(values: &[f64]) -> Self
pub fn new_iqr_from_sorted(values: &[f64]) -> Self
Constructs a new Quartiles instance from sorted data. where whiskers are calculated using interquartile range (https://en.wikipedia.org/wiki/Interquartile_range).
Trait Implementations§
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§
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