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