pub struct GenericCatCounter { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<C: Categorical> CatCount<C> for GenericCatCounter
impl<C: Categorical> CatCount<C> for GenericCatCounter
Source§fn add(&mut self, c: C)
fn add(&mut self, c: C)
Add a single observation of given category (increase this category’s count by 1).
Source§fn add_n(&mut self, c: C, n: usize)
fn add_n(&mut self, c: C, n: usize)
Add
n observations of given category (increase this category’s count by n).Source§fn remove(&mut self, c: C)
fn remove(&mut self, c: C)
Remove a single observation of given category (decrease this category’s count by 1)
Source§fn probability(&self, c: C) -> f64
fn probability(&self, c: C) -> f64
Return probability (relative count) of given category.
Source§fn most_frequent(&self) -> C
fn most_frequent(&self) -> C
Return the most frequent category.
Source§impl Clone for GenericCatCounter
impl Clone for GenericCatCounter
Source§fn clone(&self) -> GenericCatCounter
fn clone(&self) -> GenericCatCounter
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 moreAuto Trait Implementations§
impl Freeze for GenericCatCounter
impl RefUnwindSafe for GenericCatCounter
impl Send for GenericCatCounter
impl Sync for GenericCatCounter
impl Unpin for GenericCatCounter
impl UnsafeUnpin for GenericCatCounter
impl UnwindSafe for GenericCatCounter
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