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: Copy> Copy for Statistics<T>
impl<T: Clone> Clone for Statistics<T>
[src]
impl<T: Clone> Clone for Statistics<T>
fn clone(&self) -> Statistics<T>
[src]
fn clone(&self) -> Statistics<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for Statistics<T>
[src]
impl<T: PartialEq> PartialEq for Statistics<T>
fn eq(&self, other: &Statistics<T>) -> bool
[src]
fn eq(&self, other: &Statistics<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Statistics<T>) -> bool
[src]
fn ne(&self, other: &Statistics<T>) -> bool
This method tests for !=
.
impl<T: Debug> Debug for Statistics<T>
[src]
impl<T: Debug> Debug for Statistics<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Stats<T> for Statistics<T> where
T: RealNumber,
[src]
impl<T> Stats<T> for Statistics<T> where
T: RealNumber,
fn empty() -> Self
[src]
fn empty() -> Self
Creates an empty statistics struct.
fn invalid() -> Self
[src]
fn invalid() -> Self
Creates a statistics struct which resembles an invalid result.
fn merge(stats: &[Statistics<T>]) -> Statistics<T>
[src]
fn merge(stats: &[Statistics<T>]) -> Statistics<T>
Merges several statistics into one.
fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>
[src]
fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>
Merges several vectors of statistics into one vector.
fn empty_vec(len: usize) -> StatsVec<Self>
[src]
fn empty_vec(len: usize) -> StatsVec<Self>
Creates a vector of empty statistics structs.
fn add(&mut self, elem: T, index: usize)
[src]
fn add(&mut self, elem: T, index: usize)
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]
impl<T> Stats<Complex<T>> for Statistics<Complex<T>> where
T: RealNumber,
fn empty() -> Self
[src]
fn empty() -> Self
Creates an empty statistics struct.
fn invalid() -> Self
[src]
fn invalid() -> Self
Creates a statistics struct which resembles an invalid result.
fn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
[src]
fn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
Merges several statistics into one.
fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>
[src]
fn merge_cols(stats: &[StatsVec<Self>]) -> StatsVec<Self>
Merges several vectors of statistics into one vector.
fn empty_vec(len: usize) -> StatsVec<Self>
[src]
fn empty_vec(len: usize) -> StatsVec<Self>
Creates a vector of empty statistics structs.
fn add(&mut self, elem: Complex<T>, index: usize)
[src]
fn add(&mut self, elem: Complex<T>, index: usize)
Adds a new value to the statistics, all statistic fields get updated.
impl<T> PreciseStats<T> for Statistics<T> where
T: RealNumber,
[src]
impl<T> PreciseStats<T> for Statistics<T> where
T: RealNumber,
fn add_prec(&mut self, elem: T, index: usize, sumc: &mut T, rmsc: &mut T)
[src]
fn add_prec(&mut self, elem: T, index: usize, sumc: &mut T, rmsc: &mut T)
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]
impl<T> PreciseStats<Complex<T>> for Statistics<Complex<T>> where
T: RealNumber,
Auto Trait Implementations
impl<T> Send for Statistics<T> where
T: Send,
impl<T> Send for Statistics<T> where
T: Send,
impl<T> Sync for Statistics<T> where
T: Sync,
impl<T> Sync for Statistics<T> where
T: Sync,