pub struct Stats<T: Float + Default + AddAssign + SubAssign + AsPrimitive<T>> {
pub data: Vec<T>,
/* private fields */
}Fields§
§data: Vec<T>Implementations§
Source§impl<T: Float + Default + AddAssign + SubAssign + AsPrimitive<T>> Stats<T>where
usize: AsPrimitive<T>,
impl<T: Float + Default + AddAssign + SubAssign + AsPrimitive<T>> Stats<T>where
usize: AsPrimitive<T>,
pub fn new() -> Self
pub fn reset(&mut self)
pub fn mean(&mut self) -> Option<T>
pub fn stddev(&mut self) -> Option<T>
pub fn min(&self) -> Option<T>
pub fn max(&self) -> Option<T>
pub fn append(&mut self, other: &mut [T])
pub fn count_in_range<R>(&mut self, range: &R) -> [usize; 2]where
R: RangeBounds<usize>,
pub fn data(&mut self) -> Vec<T>
pub fn drain<R>(&mut self, range: R) -> Vec<T>where
R: RangeBounds<usize>,
pub fn insert(&mut self, index: usize, element: T)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn pop(&mut self) -> Option<T>
pub fn push(&mut self, x: T)
pub fn push_vec(&mut self, v: Vec<T>)
pub fn remove(&mut self, index: usize) -> T
pub fn resize(&mut self, new_len: usize, value: T)
pub fn splice<R>(&mut self, range: R, replace_with: Vec<T>) -> Vec<T>where
R: RangeBounds<usize>,
pub fn split_off(&mut self, at: usize) -> Vec<T>
pub fn swap_remove(&mut self, index: usize) -> T
pub fn trim(&mut self, len: usize)
pub fn truncate(&mut self, len: usize)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Stats<T>where
T: Freeze,
impl<T> RefUnwindSafe for Stats<T>where
T: RefUnwindSafe,
impl<T> Send for Stats<T>where
T: Send,
impl<T> Sync for Stats<T>where
T: Sync,
impl<T> Unpin for Stats<T>where
T: Unpin,
impl<T> UnwindSafe for Stats<T>where
T: 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