pub struct StatisticsBundle { /* private fields */ }Implementations§
Source§impl StatisticsBundle
impl StatisticsBundle
Sourcepub fn from(vals: &[f64]) -> Option<StatisticsBundle>
pub fn from(vals: &[f64]) -> Option<StatisticsBundle>
Create a statistics bundle from a sequence of values.
Note that as opposed to the with_percentiles method, there is no
requirement that these values are sorted.
This method returns None if the sequence of values is empty.
Sourcepub fn with_percentiles(
vals: &[f64],
percentiles: &[u8],
) -> Option<StatisticsBundle>
pub fn with_percentiles( vals: &[f64], percentiles: &[u8], ) -> Option<StatisticsBundle>
Create a statistics bundle from a sorted sequence of values and a sequence of percentiles.
The values must be sorted or the statistics will be incorrect.
This method returns None if the sequence of values is empty.
Additionally, if there are not enough values to create all the
desired percentile slices (e.g. 90th percentile for a series of
only 7 values) the slices without enough values will be omitted.
pub fn global_stats(&self) -> &Statistics
pub fn percentile_stats(&self) -> &[Statistics]
Trait Implementations§
Source§impl Clone for StatisticsBundle
impl Clone for StatisticsBundle
Source§fn clone(&self) -> StatisticsBundle
fn clone(&self) -> StatisticsBundle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StatisticsBundle
impl RefUnwindSafe for StatisticsBundle
impl Send for StatisticsBundle
impl Sync for StatisticsBundle
impl Unpin for StatisticsBundle
impl UnwindSafe for StatisticsBundle
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