Struct basic_dsp_vector::Statistics
[−]
[src]
#[repr(C)]pub struct Statistics<T> { pub sum: T, pub count: usize, pub average: T, pub rms: T, pub min: T, pub min_index: usize, pub max: T, pub max_index: usize, }
Statistics about numeric data
Fields
sum: T
Sum of all values
count: usize
How many numbers have been considered for the stats
average: T
Average value
rms: T
Root-mean-square or rms over all values.
min: T
The smallest value.
min_index: usize
The index of the smallest value.
max: T
The largest value.
max_index: usize
The index of the largest value.
Trait Implementations
impl<T: Copy> Copy for Statistics<T>
[src]
impl<T: Clone> Clone for Statistics<T>
[src]
fn clone(&self) -> Statistics<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for Statistics<T>
[src]
fn eq(&self, __arg_0: &Statistics<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Statistics<T>) -> bool
[src]
This method tests for !=
.
impl<T: Debug> Debug for Statistics<T>
[src]
impl<T> Stats<T> for Statistics<T> where
T: RealNumber,
[src]
T: RealNumber,
fn empty() -> Self
[src]
Creates an empty statistics struct.
fn invalid() -> Self
[src]
Creates a statistics struct which resembles an invalid result.
fn merge(stats: &[Statistics<T>]) -> Statistics<T>
[src]
Merges several statistics into one.
fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>
[src]
Merges several vectors of statistics into one vector.
fn empty_vec(len: usize) -> StatsVec<Self>
[src]
Creates a vector of empty statistics structs.
fn add(&mut self, elem: T, index: usize)
[src]
Adds a new value to the statistics, all statistic fields get updated.
impl<T> Stats<Complex<T>> for Statistics<Complex<T>> where
T: RealNumber,
[src]
T: RealNumber,
fn empty() -> Self
[src]
Creates an empty statistics struct.
fn invalid() -> Self
[src]
Creates a statistics struct which resembles an invalid result.
fn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
[src]
Merges several statistics into one.
fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>
[src]
Merges several vectors of statistics into one vector.
fn empty_vec(len: usize) -> StatsVec<Self>
[src]
Creates a vector of empty statistics structs.
fn add(&mut self, elem: Complex<T>, index: usize)
[src]
Adds a new value to the statistics, all statistic fields get updated.
impl<T> PreciseStats<T> for Statistics<T> where
T: RealNumber,
[src]
T: RealNumber,
fn add_prec(&mut self, elem: T, index: usize, sumc: &mut T, rmsc: &mut T)
[src]
Adds a new values to the statistics using the Kahan summation algorithm described here: https://en.wikipedia.org/wiki/Kahan_summation_algorithm Read more
impl<T> PreciseStats<Complex<T>> for Statistics<Complex<T>> where
T: RealNumber,
[src]
T: RealNumber,