Trait Stats

Source
pub trait Stats<T>: Sized {
    // Required methods
    fn empty() -> Self;
    fn empty_vec(len: usize) -> StatsVec<Self>;
    fn invalid() -> Self;
    fn merge(stats: &[Self]) -> Self;
    fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>;
    fn add(&mut self, elem: T, index: usize);
}
Expand description

Operations on statistics.

Required Methods§

Source

fn empty() -> Self

Creates an empty statistics struct.

Source

fn empty_vec(len: usize) -> StatsVec<Self>

Creates a vector of empty statistics structs.

Source

fn invalid() -> Self

Creates a statistics struct which resembles an invalid result.

Source

fn merge(stats: &[Self]) -> Self

Merges several statistics into one.

Source

fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>

Merges several vectors of statistics into one vector.

Source

fn add(&mut self, elem: T, index: usize)

Adds a new value to the statistics, all statistic fields get updated.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Stats<Complex<T>> for Statistics<Complex<T>>
where T: RealNumber,

Source§

impl<T> Stats<T> for Statistics<T>
where T: RealNumber,