15个版本 (3个稳定版)
| 1.0.2 | 2022年6月6日 | 
|---|---|
| 1.0.0 | 2020年12月21日 | 
| 0.0.12 | 2019年11月12日 | 
| 0.0.11 | 2017年1月24日 | 
| 0.0.1 | 2014年11月26日 | 
#464 in 算法
1,081 每月下载量
用于 基数估计器
115KB
 4K  SLoC
hyperloglog
Rust中的HyperLogLog实现,具有偏差校正。
安装:使用 Cargo
[dependencies]
hyperloglog = "0"
使用方法
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);
可选Cargo特性
- with_serde:启用通过- serde进行序列化。
lib.rs:
Rust的HyperLogLog实现
依赖项
~335–580KB
~11K SLoC