Trait Statistics

Source
pub trait Statistics<T> {
    // Required methods
    fn mean(self) -> Option<T>;
    fn median(self) -> Option<T>;
    fn variance(self) -> Option<T>;
    fn std(self) -> Option<T>;
    fn float_max(self) -> T;
    fn float_min(self) -> T;
    fn difference(self) -> T;
    fn zero_crossings(self) -> usize;
    fn peak_average_ratio(self) -> Option<T>;
}
Expand description

NOTE: if there are any NaNs in the Iterator then this trait will prduce unstable results

Required Methods§

Source

fn mean(self) -> Option<T>

Source

fn median(self) -> Option<T>

Source

fn variance(self) -> Option<T>

Source

fn std(self) -> Option<T>

Source

fn float_max(self) -> T

Source

fn float_min(self) -> T

Source

fn difference(self) -> T

Source

fn zero_crossings(self) -> usize

Source

fn peak_average_ratio(self) -> Option<T>

Implementors§

Source§

impl<'a, T: Iterator<Item = &'a f32>> Statistics<f32> for T

Source§

impl<'a, T: Iterator<Item = &'a f64>> Statistics<f64> for T