pub trait StdDevValue: Copy + 'static {
type Moment: Copy + 'static;
const ZERO: Self::Moment;
// Required methods
fn moment(self) -> Self::Moment;
fn plus(left: Self::Moment, right: Self::Moment) -> Self::Moment;
fn minus(left: Self::Moment, right: Self::Moment) -> Self::Moment;
fn times(left: Self::Moment, right: Self::Moment) -> Self::Moment;
fn deviation(
count: i32,
sum_of_items: Self::Moment,
sum_of_squares: Self::Moment,
) -> f64;
fn to_f64(self) -> f64;
}Expand description
A value whose standard deviation the aggregations compute (int, long, float, double).
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn plus(left: Self::Moment, right: Self::Moment) -> Self::Moment
fn plus(left: Self::Moment, right: Self::Moment) -> Self::Moment
left + right, wrapping on overflow for the integers (C#’s unchecked arithmetic).
Sourcefn minus(left: Self::Moment, right: Self::Moment) -> Self::Moment
fn minus(left: Self::Moment, right: Self::Moment) -> Self::Moment
left - right, wrapping on overflow for the integers.
Sourcefn times(left: Self::Moment, right: Self::Moment) -> Self::Moment
fn times(left: Self::Moment, right: Self::Moment) -> Self::Moment
left * right, wrapping on overflow for the integers.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl StdDevValue for f32
impl StdDevValue for f32
Source§fn deviation(count: i32, sum_of_items: f32, sum_of_squares: f32) -> f64
fn deviation(count: i32, sum_of_items: f32, sum_of_squares: f32) -> f64
The variance in float, as upstream computes it, and its square root in double.