Trait SummaryStatistics

Source
pub trait SummaryStatistics {
    type Item: FromPrimitive;
    type Output: NumOps<Self::Item>;

    // Required methods
    fn len(&self) -> usize;
    fn product(&self) -> Self::Output;
    fn sum(&self) -> Self::Output;
    fn std(&self) -> Self::Output;
    fn var(&self) -> Self::Output;

    // Provided methods
    fn elems(&self) -> Self::Item { ... }
    fn mean(&self) -> Self::Output { ... }
}
Expand description

This trait describes the fundamental methods of summary statistics. These include the mean, standard deviation, variance, and more.

Required Associated Types§

Required Methods§

Source

fn len(&self) -> usize

Source

fn product(&self) -> Self::Output

Source

fn sum(&self) -> Self::Output

Source

fn std(&self) -> Self::Output

Source

fn var(&self) -> Self::Output

Provided Methods§

Source

fn elems(&self) -> Self::Item

Source

fn mean(&self) -> Self::Output

Implementations on Foreign Types§

Source§

impl<'a, T, I> SummaryStatistics for &'a I
where I: ExactSizeIterator<Item = T> + Clone, T: Copy + FromPrimitive + Num + Pow<i32, Output = T> + Product + Root<Output = T> + Sum,

Source§

impl<A, S, D> SummaryStatistics for ArrayBase<S, D>
where A: Copy + FromPrimitive + Num + Pow<i32, Output = A> + Product + Root<Output = A> + Sum, D: Dimension, S: Data<Elem = A>, &'a A: for<'a> Product,

Source§

impl<T> SummaryStatistics for [T]
where T: FromPrimitive + Num + Pow<i32, Output = T> + Product + Root<Output = T> + Copy + Sum,

Source§

impl<T> SummaryStatistics for Vec<T>
where T: FromPrimitive + Num + Pow<i32, Output = T> + Product + Root<Output = T> + Copy + Sum,

Implementors§