Crate hypertwobits
source ·Expand description
HyperTwoBits is a probabilistic data structure that estimates the number of distinct elements in a set.
It has the same use case as HyperLogLog, but it uses less memory and is faster while achiving a roughly similar precision.
similar accuracy.
This implementation holds the entire sketch in the stack without heap allocations. It defaults to
ahash for hashing, but you can use any hasher that implements std::hash::Hasher.
use hypertwobits::{h2b::HyperTwoBits, h2b::M512};
let mut htb = HyperTwoBits::<M512>::default();
htb.insert(&"foo");
htb.insert(&"bar");
htb.count();Re-exports§
pub use prelude::*;
Modules§
HyperTwoBitsimplementationHyperThreeBitsimplementationHyperBitBit64implementation- Prelude for easy importing
Structs§
- Random Seeded
AHasherBuilder that allows for seeded hashing perHyperTwoBitisnstance - Random Seeded
SipHasher13Builder
Type Aliases§
- Non seeded
AHasherBuilder that is fater but will create completely predictable results - Non seeded
SipHasher13Builder that is fater but will create completely predictable results