pub struct ArithmeticMean<T> { /* private fields */ }
Expand description
Arithmetic mean statistic.
The arithmetic mean sums samples within their domain and computes the mean as a real number
represented using floating-point. For floating-point samples, NaN
s are discarded and the sum
saturates to infinity without error.
This statistic is sensitive to overflow in the count of samples.
Implementations§
Source§impl<T> ArithmeticMean<T>
impl<T> ArithmeticMean<T>
Trait Implementations§
Source§impl<T: Clone> Clone for ArithmeticMean<T>
impl<T: Clone> Clone for ArithmeticMean<T>
Source§fn clone(&self) -> ArithmeticMean<T>
fn clone(&self) -> ArithmeticMean<T>
Returns a duplicate 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> Debug for ArithmeticMean<T>
impl<T: Debug> Debug for ArithmeticMean<T>
Source§impl<T> Default for ArithmeticMean<T>where
T: Zero,
impl<T> Default for ArithmeticMean<T>where
T: Zero,
Source§impl Statistic for ArithmeticMean<f32>
impl Statistic for ArithmeticMean<f32>
Source§type Aggregation = f32
type Aggregation = f32
The type of the statistical aggregation.
Source§fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
Folds a sample into the aggregation of the statistic. Read more
Source§fn fill(
&mut self,
sample: Self::Sample,
n: NonZeroUsize,
) -> Result<(), FoldError>
fn fill( &mut self, sample: Self::Sample, n: NonZeroUsize, ) -> Result<(), FoldError>
Folds a sample into the aggregation of a statistic
n
(one or more) times. Read moreSource§fn aggregation(&self) -> Option<Self::Aggregation>
fn aggregation(&self) -> Option<Self::Aggregation>
Gets the statistical aggregation. Read more
Source§impl Statistic for ArithmeticMean<i64>
impl Statistic for ArithmeticMean<i64>
Source§type Aggregation = f32
type Aggregation = f32
The type of the statistical aggregation.
Source§fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
Folds a sample into the aggregation of the statistic. Read more
Source§fn fill(
&mut self,
sample: Self::Sample,
n: NonZeroUsize,
) -> Result<(), FoldError>
fn fill( &mut self, sample: Self::Sample, n: NonZeroUsize, ) -> Result<(), FoldError>
Folds a sample into the aggregation of a statistic
n
(one or more) times. Read moreSource§fn aggregation(&self) -> Option<Self::Aggregation>
fn aggregation(&self) -> Option<Self::Aggregation>
Gets the statistical aggregation. Read more
Source§impl Statistic for ArithmeticMean<u64>
impl Statistic for ArithmeticMean<u64>
Source§type Aggregation = f32
type Aggregation = f32
The type of the statistical aggregation.
Source§fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
Folds a sample into the aggregation of the statistic. Read more
Source§fn fill(
&mut self,
sample: Self::Sample,
n: NonZeroUsize,
) -> Result<(), FoldError>
fn fill( &mut self, sample: Self::Sample, n: NonZeroUsize, ) -> Result<(), FoldError>
Folds a sample into the aggregation of a statistic
n
(one or more) times. Read moreSource§fn aggregation(&self) -> Option<Self::Aggregation>
fn aggregation(&self) -> Option<Self::Aggregation>
Gets the statistical aggregation. Read more
Auto Trait Implementations§
impl<T> Freeze for ArithmeticMean<T>where
T: Freeze,
impl<T> RefUnwindSafe for ArithmeticMean<T>where
T: RefUnwindSafe,
impl<T> Send for ArithmeticMean<T>where
T: Send,
impl<T> Sync for ArithmeticMean<T>where
T: Sync,
impl<T> Unpin for ArithmeticMean<T>where
T: Unpin,
impl<T> UnwindSafe for ArithmeticMean<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<F> StatisticExt for Fwhere
F: Statistic,
impl<F> StatisticExt for Fwhere
F: Statistic,
Source§fn get_aggregation_and_reset(&mut self) -> Option<Self::Aggregation>
fn get_aggregation_and_reset(&mut self) -> Option<Self::Aggregation>
Gets the statistical aggregation and resets the statistic.