pub struct Summary<T> {
pub n: usize,
pub min: T,
pub max: T,
pub mean: f64,
pub variance: f64,
}Expand description
Statistical summary for a given iterator of numbers.
Calculates all the information using single pass over the data. Mean and variance are calculated using streaming algorithm described in Art of Computer Programming, Vol 2, page 232.
Fields§
§n: usize§min: T§max: T§mean: f64§variance: f64Implementations§
Source§impl<T: PartialOrd> Summary<T>
impl<T: PartialOrd> Summary<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Summary<T>where
T: Freeze,
impl<T> RefUnwindSafe for Summary<T>where
T: RefUnwindSafe,
impl<T> Send for Summary<T>where
T: Send,
impl<T> Sync for Summary<T>where
T: Sync,
impl<T> Unpin for Summary<T>where
T: Unpin,
impl<T> UnsafeUnpin for Summary<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Summary<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