pub struct Batch {
data: Vec<f64>,
sorted: bool,
streaming: Streaming,
}Expand description
Batch statistics for a complete dataset.
Fields§
§data: Vec<f64>§sorted: bool§streaming: StreamingImplementations§
Source§impl Batch
impl Batch
pub fn new(values: Vec<f64>) -> Self
pub fn count(&self) -> usize
pub fn mean(&self) -> f64
pub fn variance(&self) -> f64
pub fn std_dev(&self) -> f64
pub fn min(&self) -> f64
pub fn max(&self) -> f64
pub fn cv(&self) -> f64
pub fn median(&mut self) -> f64
Sourcepub fn percentile(&mut self, p: usize) -> f64
pub fn percentile(&mut self, p: usize) -> f64
Percentile using linear interpolation (0-100).
fn ensure_sorted(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Batch
impl RefUnwindSafe for Batch
impl Send for Batch
impl Sync for Batch
impl Unpin for Batch
impl UnsafeUnpin for Batch
impl UnwindSafe for Batch
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