Crates.io | hyperloglog |
lib.rs | hyperloglog |
version | 1.0.2 |
source | src |
created_at | 2014-11-26 03:01:03.228618 |
updated_at | 2022-06-06 09:39:25.448383 |
description | Hyperloglog implementation in Rust |
homepage | https://github.com/jedisct1/rust-hyperloglog |
repository | https://github.com/jedisct1/rust-hyperloglog |
max_upload_size | |
id | 401 |
size | 116,096 |
A HyperLogLog implementation in Rust, with bias correction.
Installation: use Cargo:
[dependencies]
hyperloglog = "0"
Usage:
let mut hll = HyperLogLog::new(error_rate);
hll.insert(&"test1");
hll.insert(&"test2");
let card_estimation = hll.len();
let mut hll2 = HyperLogLog::new_from_template(&hll);
hll2.insert(&"test3");
hll.merge(&hll2);
with_serde
: enable serialization via serde
.