Struct basic_dsp::Statistics
source · [−]#[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,
}
Expand description
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
sourceimpl<T> Clone for Statistics<T>where
T: Clone,
impl<T> Clone for Statistics<T>where
T: Clone,
sourcefn clone(&self) -> Statistics<T>
fn clone(&self) -> Statistics<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T> Debug for Statistics<T>where
T: Debug,
impl<T> Debug for Statistics<T>where
T: Debug,
sourceimpl<T> PartialEq<Statistics<T>> for Statistics<T>where
T: PartialEq<T>,
impl<T> PartialEq<Statistics<T>> for Statistics<T>where
T: PartialEq<T>,
sourcefn eq(&self, other: &Statistics<T>) -> bool
fn eq(&self, other: &Statistics<T>) -> bool
sourceimpl<T> PreciseStats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
impl<T> PreciseStats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
sourceimpl<T> PreciseStats<T> for Statistics<T>where
T: RealNumber,
impl<T> PreciseStats<T> for Statistics<T>where
T: RealNumber,
sourceimpl<T> Stats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
impl<T> Stats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
sourcefn empty() -> Statistics<Complex<T>>
fn empty() -> Statistics<Complex<T>>
Creates an empty statistics struct.
sourcefn invalid() -> Statistics<Complex<T>>
fn invalid() -> Statistics<Complex<T>>
Creates a statistics struct which resembles an invalid result.
sourcefn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
fn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
Merges several statistics into one.
sourcefn merge_cols(
stats: &[ArrayVec<Statistics<Complex<T>>, _>]
) -> ArrayVec<Statistics<Complex<T>>, _>
fn merge_cols(
stats: &[ArrayVec<Statistics<Complex<T>>, _>]
) -> ArrayVec<Statistics<Complex<T>>, _>
Merges several vectors of statistics into one vector.
sourceimpl<T> Stats<T> for Statistics<T>where
T: RealNumber,
impl<T> Stats<T> for Statistics<T>where
T: RealNumber,
sourcefn empty() -> Statistics<T>
fn empty() -> Statistics<T>
Creates an empty statistics struct.
sourcefn invalid() -> Statistics<T>
fn invalid() -> Statistics<T>
Creates a statistics struct which resembles an invalid result.
sourcefn merge(stats: &[Statistics<T>]) -> Statistics<T>
fn merge(stats: &[Statistics<T>]) -> Statistics<T>
Merges several statistics into one.
sourcefn merge_cols(
stats: &[ArrayVec<Statistics<T>, _>]
) -> ArrayVec<Statistics<T>, _>
fn merge_cols(
stats: &[ArrayVec<Statistics<T>, _>]
) -> ArrayVec<Statistics<T>, _>
Merges several vectors of statistics into one vector.
sourcefn empty_vec(len: usize) -> ArrayVec<Statistics<T>, _>
fn empty_vec(len: usize) -> ArrayVec<Statistics<T>, _>
Creates a vector of empty statistics structs.
impl<T> Copy for Statistics<T>where
T: Copy,
impl<T> StructuralPartialEq for Statistics<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Statistics<T>where
T: RefUnwindSafe,
impl<T> Send for Statistics<T>where
T: Send,
impl<T> Sync for Statistics<T>where
T: Sync,
impl<T> Unpin for Statistics<T>where
T: Unpin,
impl<T> UnwindSafe for Statistics<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more