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§
source§impl<T> Clone for Statistics<T>where
T: Clone,
impl<T> Clone for Statistics<T>where
T: Clone,
source§fn clone(&self) -> Statistics<T>
fn clone(&self) -> Statistics<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Debug for Statistics<T>where
T: Debug,
impl<T> Debug for Statistics<T>where
T: Debug,
source§impl<T> PartialEq for Statistics<T>where
T: PartialEq,
impl<T> PartialEq for Statistics<T>where
T: PartialEq,
source§fn eq(&self, other: &Statistics<T>) -> bool
fn eq(&self, other: &Statistics<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> PreciseStats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
impl<T> PreciseStats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
source§impl<T> PreciseStats<T> for Statistics<T>where
T: RealNumber,
impl<T> PreciseStats<T> for Statistics<T>where
T: RealNumber,
source§impl<T> Stats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
impl<T> Stats<Complex<T>> for Statistics<Complex<T>>where
T: RealNumber,
source§fn empty() -> Statistics<Complex<T>>
fn empty() -> Statistics<Complex<T>>
Creates an empty statistics struct.
source§fn invalid() -> Statistics<Complex<T>>
fn invalid() -> Statistics<Complex<T>>
Creates a statistics struct which resembles an invalid result.
source§fn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
fn merge(stats: &[Statistics<Complex<T>>]) -> Statistics<Complex<T>>
Merges several statistics into one.
source§fn merge_cols(
stats: &[ArrayVec<Statistics<Complex<T>>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>]
) -> ArrayVec<Statistics<Complex<T>>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>
fn merge_cols( stats: &[ArrayVec<Statistics<Complex<T>>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>] ) -> ArrayVec<Statistics<Complex<T>>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>
Merges several vectors of statistics into one vector.
source§impl<T> Stats<T> for Statistics<T>where
T: RealNumber,
impl<T> Stats<T> for Statistics<T>where
T: RealNumber,
source§fn empty() -> Statistics<T>
fn empty() -> Statistics<T>
Creates an empty statistics struct.
source§fn invalid() -> Statistics<T>
fn invalid() -> Statistics<T>
Creates a statistics struct which resembles an invalid result.
source§fn merge(stats: &[Statistics<T>]) -> Statistics<T>
fn merge(stats: &[Statistics<T>]) -> Statistics<T>
Merges several statistics into one.
source§fn merge_cols(
stats: &[ArrayVec<Statistics<T>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>]
) -> ArrayVec<Statistics<T>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>
fn merge_cols( stats: &[ArrayVec<Statistics<T>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>] ) -> ArrayVec<Statistics<T>, basic_dsp_vector::::vector_types::general::statistics::StatsVec::{constant#0}>
Merges several vectors of statistics into one vector.
impl<T> Copy for Statistics<T>where
T: Copy,
impl<T> StructuralPartialEq for Statistics<T>
Auto Trait Implementations§
impl<T> Freeze for Statistics<T>where
T: Freeze,
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more