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§
- h2b
HyperTwoBitsimplementation- h3b
HyperThreeBitsimplementation- hbb64
HyperBitBit64implementation- prelude
- Prelude for easy importing
Structs§
- AHasher
Builder - Random Seeded
AHasherBuilder that allows for seeded hashing perHyperTwoBitisnstance - SipHasher13
Builder - Random Seeded
SipHasher13Builder
Type Aliases§
- AHasher
Default Builder - Non seeded
AHasherBuilder that is fater but will create completely predictable results - SipHasher13
Default Builder - Non seeded
SipHasher13Builder that is fater but will create completely predictable results