Trait basic_dsp_vector::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.

Object Safety§

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,