Stats

Struct Stats 

Source
pub struct Stats { /* private fields */ }

Implementations§

Source§

impl Stats

Source

pub fn new() -> Self

Source

pub fn reset(&mut self)

Source

pub fn mean(&mut self) -> Option<f64>

Source

pub fn stddev(&mut self) -> Option<f64>

Source

pub fn min(&self) -> Option<f64>

Source

pub fn max(&self) -> Option<f64>

Source

pub fn append(&mut self, other: &mut [f64])

Source

pub fn count_in_range<R>(&mut self, range: &R) -> [usize; 2]
where R: RangeBounds<usize>,

Source

pub fn data(&mut self) -> Vec<f64>

Source

pub fn drain<R>(&mut self, range: R) -> Vec<f64>
where R: RangeBounds<usize>,

Source

pub fn insert(&mut self, index: usize, element: f64)

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn pop(&mut self) -> Option<f64>

Source

pub fn push(&mut self, x: f64)

Source

pub fn push_vec(&mut self, v: Vec<f64>)

Source

pub fn remove(&mut self, index: usize) -> f64

Source

pub fn resize(&mut self, new_len: usize, value: f64)

Source

pub fn splice<R>(&mut self, range: R, replace_with: Vec<f64>) -> Vec<f64>
where R: RangeBounds<usize>,

Source

pub fn split_off(&mut self, at: usize) -> Vec<f64>

Source

pub fn swap_remove(&mut self, index: usize) -> f64

Source

pub fn trim(&mut self, index: usize)

Source

pub fn truncate(&mut self, len: usize)

Trait Implementations§

Source§

impl Debug for Stats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Stats

Source§

fn default() -> Stats

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.