pub struct HyperLogLog16 { /* private fields */ }Expand description
HyperLogLog++ for cardinality (unique count) estimation
Memory: $m bytes Error: ~1.04 / sqrt($m)
Implementations§
Source§impl HyperLogLog16
impl HyperLogLog16
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 HyperLogLog16
impl Clone for HyperLogLog16
Source§impl Debug for HyperLogLog16
impl Debug for HyperLogLog16
Source§impl Default for HyperLogLog16
impl Default for HyperLogLog16
Auto Trait Implementations§
impl Freeze for HyperLogLog16
impl RefUnwindSafe for HyperLogLog16
impl Send for HyperLogLog16
impl Sync for HyperLogLog16
impl Unpin for HyperLogLog16
impl UnsafeUnpin for HyperLogLog16
impl UnwindSafe for HyperLogLog16
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