pub struct ParallelStats {
pub count: AtomicUsize,
pub sums: Vec<AtomicU64>,
pub sum_squares: Vec<AtomicU64>,
pub mins: Vec<f64>,
pub maxs: Vec<f64>,
}Expand description
Thread-safe statistics accumulator
Fields§
§count: AtomicUsizecount
sums: Vec<AtomicU64>sums
sum_squares: Vec<AtomicU64>sum_squares
mins: Vec<f64>mins
maxs: Vec<f64>maxs
Implementations§
Source§impl ParallelStats
impl ParallelStats
pub fn new(n_features: usize) -> Self
pub fn update_row(&mut self, row: ArrayView1<'_, f64>)
pub fn merge(&mut self, other: ParallelStats)
pub fn finalize(&self)
pub fn get_means(&self) -> Vec<f64>
pub fn get_variances(&self) -> Vec<f64>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ParallelStats
impl Forget for ParallelStats
impl Move for ParallelStats
impl RefUnwindSafe for ParallelStats
impl Send for ParallelStats
impl Sync for ParallelStats
impl Unpin for ParallelStats
impl UnsafeUnpin for ParallelStats
impl UnwindSafe for ParallelStats
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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