pub struct ScalarStats {
pub mean: f64,
pub stddev: f64,
pub ci95_hw: f64,
}Expand description
Aggregated statistics across N independent samples of one quantity.
For n < 3 only mean is meaningful; stddev and ci95_hw are
reported as 0 and the serializer omits them via skip_serializing_if.
Fields§
§mean: f64§stddev: f64§ci95_hw: f64Implementations§
Source§impl ScalarStats
impl ScalarStats
Sourcepub fn from_samples(xs: &[f64]) -> Self
pub fn from_samples(xs: &[f64]) -> Self
Aggregate per-run scalars into mean/stddev/CI95 across runs.
xs.len() is the number of repeats. Uses sample variance
(divide by n − 1). CI95 half-width via Student’s t (two-sided
95%, df = n − 1).
Sourcepub fn differs_from(&self, other: &Self) -> bool
pub fn differs_from(&self, other: &Self) -> bool
True if the absolute mean difference exceeds the sum of the two half-widths — i.e. the difference is statistically significant at the 95% level (CIs do not overlap).
Trait Implementations§
Source§impl Clone for ScalarStats
impl Clone for ScalarStats
Source§fn clone(&self) -> ScalarStats
fn clone(&self) -> ScalarStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ScalarStats
Source§impl Debug for ScalarStats
impl Debug for ScalarStats
Source§impl<'de> Deserialize<'de> for ScalarStats
impl<'de> Deserialize<'de> for ScalarStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScalarStats
impl PartialEq for ScalarStats
Source§fn eq(&self, other: &ScalarStats) -> bool
fn eq(&self, other: &ScalarStats) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScalarStats
impl Serialize for ScalarStats
impl StructuralPartialEq for ScalarStats
Auto Trait Implementations§
impl Freeze for ScalarStats
impl RefUnwindSafe for ScalarStats
impl Send for ScalarStats
impl Sync for ScalarStats
impl Unpin for ScalarStats
impl UnsafeUnpin for ScalarStats
impl UnwindSafe for ScalarStats
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