Struct cmsketch::CMSketchU8
source · pub struct CMSketchU8 { /* private fields */ }Implementations§
source§impl CMSketchU8
impl CMSketchU8
sourcepub fn new(
error: f64,
probability: f64,
max_width: usize,
max_depth: usize
) -> Self
pub fn new( error: f64, probability: f64, max_width: usize, max_depth: usize ) -> Self
error: Tolerable error in count given as a fraction of the total number of inserts. Must be between 0 and 1.
probability: The certainty that the count is with in the error threshold.
max_width: Maximum number of the elements per row in the table. 0 represents there is no limitations.
max_depth: Maximum num of rows. 0 represents there is no limitations.
pub fn new_with_size(width: usize, depth: usize) -> Self
pub fn record(&mut self, key: u64)
pub fn count(&self, key: u64) -> u8
pub fn remove(&mut self, key: u64)
pub fn clear(&mut self)
pub fn decay(&mut self, decay: f64)
pub fn width(&self) -> usize
pub fn depth(&self) -> usize
pub fn max_count(&self) -> u8
pub fn saturated(&self) -> usize
pub fn raw(&self) -> &[u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CMSketchU8
impl Send for CMSketchU8
impl Sync for CMSketchU8
impl Unpin for CMSketchU8
impl UnwindSafe for CMSketchU8
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