pub struct Mean<Type> { /* private fields */ }
Expand description
Standard rolling average/mean of all the samples pushed into it.
Implementations§
Trait Implementations§
Source§impl<Type> StreamingStatistic for Mean<Type>
impl<Type> StreamingStatistic for Mean<Type>
type Type = Type
Source§fn add_sample(&mut self, sample: Self::Type) -> Self::Type
fn add_sample(&mut self, sample: Self::Type) -> Self::Type
adds a sample to this streaming statistic, returning a result of the operation.
Source§fn get_last_sample(&self) -> Self::Type
fn get_last_sample(&self) -> Self::Type
Returns a copy of the last sample added
Source§fn get_last_result(&self) -> Self::Type
fn get_last_result(&self) -> Self::Type
Returns the last value returned by ‘add_sample’
Source§fn get_num_samples(&self) -> u64
fn get_num_samples(&self) -> u64
Returns the total number of samples pushed in
impl<Type: Copy> Copy for Mean<Type>
Auto Trait Implementations§
impl<Type> Freeze for Mean<Type>where
Type: Freeze,
impl<Type> RefUnwindSafe for Mean<Type>where
Type: RefUnwindSafe,
impl<Type> Send for Mean<Type>where
Type: Send,
impl<Type> Sync for Mean<Type>where
Type: Sync,
impl<Type> Unpin for Mean<Type>where
Type: Unpin,
impl<Type> UnwindSafe for Mean<Type>where
Type: UnwindSafe,
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