pub struct CountMinSketch { /* private fields */ }Expand description
Count-Min Sketch over 128-bit item keys.
Implementations§
Source§impl CountMinSketch
impl CountMinSketch
Sourcepub fn default_params() -> Self
pub fn default_params() -> Self
Default planner-sized sketch (d=4, w=2048).
Sourcepub fn add(&mut self, key: u128, delta: u64)
pub fn add(&mut self, key: u128, delta: u64)
Increment the counters for key by delta (usually 1).
Sourcepub fn estimate(&self, key: u128) -> u64
pub fn estimate(&self, key: u128) -> u64
Estimated frequency of key (min across rows; never underestimates
relative to true count in the absence of wraparound).
Sourcepub fn merge(&mut self, other: &Self) -> Result<(), StatsError>
pub fn merge(&mut self, other: &Self) -> Result<(), StatsError>
Element-wise add; dimensions must match.
Trait Implementations§
Source§impl Clone for CountMinSketch
impl Clone for CountMinSketch
Source§fn clone(&self) -> CountMinSketch
fn clone(&self) -> CountMinSketch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CountMinSketch
impl Debug for CountMinSketch
Source§impl PartialEq for CountMinSketch
impl PartialEq for CountMinSketch
impl Eq for CountMinSketch
impl StructuralPartialEq for CountMinSketch
Auto Trait Implementations§
impl Freeze for CountMinSketch
impl RefUnwindSafe for CountMinSketch
impl Send for CountMinSketch
impl Sync for CountMinSketch
impl Unpin for CountMinSketch
impl UnsafeUnpin for CountMinSketch
impl UnwindSafe for CountMinSketch
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