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