pub struct HyperLogLog12 { /* private fields */ }Expand description
HyperLogLog++ for cardinality (unique count) estimation
Memory: $m bytes Error: ~1.04 / sqrt($m)
Implementations§
Source§impl HyperLogLog12
impl HyperLogLog12
Sourcepub const fn insert_hash(&mut self, hash: u64)
pub const fn insert_hash(&mut self, hash: u64)
Insert an already-hashed value
Sourcepub fn insert_bytes(&mut self, bytes: &[u8])
pub fn insert_bytes(&mut self, bytes: &[u8])
Insert raw bytes
Sourcepub fn cardinality(&self) -> f64
pub fn cardinality(&self) -> f64
Estimate cardinality using HyperLogLog++ algorithm
Optimized with LUT for 2^{-k} values
Trait Implementations§
Source§impl Clone for HyperLogLog12
impl Clone for HyperLogLog12
Source§impl Debug for HyperLogLog12
impl Debug for HyperLogLog12
Source§impl Default for HyperLogLog12
impl Default for HyperLogLog12
Auto Trait Implementations§
impl Freeze for HyperLogLog12
impl RefUnwindSafe for HyperLogLog12
impl Send for HyperLogLog12
impl Sync for HyperLogLog12
impl Unpin for HyperLogLog12
impl UnsafeUnpin for HyperLogLog12
impl UnwindSafe for HyperLogLog12
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