Crate hypertwobits

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§

h2b
HyperTwoBits implementation
h3b
HyperThreeBits implementation
hbb64
HyperBitBit64 implementation
prelude
Prelude for easy importing

Structs§

AHasherBuilder
Random Seeded AHasher Builder that allows for seeded hashing per HyperTwoBit isnstance
SipHasher13Builder
Random Seeded SipHasher13 Builder

Type Aliases§

AHasherDefaultBuilder
Non seeded AHasher Builder that is fater but will create completely predictable results
SipHasher13DefaultBuilder
Non seeded SipHasher13 Builder that is fater but will create completely predictable results