HyperBitBit
A native rust implementation of a HyperBitBit algorithm introduced by by Robert Sedgewick in AC11-Cardinality.pdf
Feature
- HyperBitBit, for N < 2^64
- Uses 128 + 8 bit of space
- Estimated cardinality withing 10% or actuals for large N.
Consider HyperLogLog variants for productions usage, sine this data structure extensively studied, merge able and more accurate. HyperBitBit is extremely cheap and fast alternative in expense of accuracy.
Usage
This crate is on crates.io and
can be used by adding hyperbitbit to the dependencies in your
project's Cargo.toml.
[]
= "0.0.1-alpha.1"
If you want serde support, include the feature like this:
[]
= { = "0.0.1-alpha.1", = ["serde_support"] }
add this to your crate root:
extern crate hyperbitbit;
Example
Create a HyperBitBit, add more data and estimate cardinality
use HyperBitBit;
use Alphanumeric;
use *;
use HashSet;
Lincese
Licensed under the Apache License, Version 2.0