用python实现布谷鸟滤波器
cuckoofilter的Python项目详细描述
布谷鸟过滤器是用python实现的布谷鸟过滤器,它是线程安全的。
此外,该软件包既可用于python2.x,也可用于python3.x。
http://www. cu.EdU/~dGA/PoC/CuCuO-CONExc4.pdf,Bin Fan,David G. Andersen,Michael Kaminsky和Michael D. Mitzenmacher,用于BR/>代替Bloom过滤器进行近似集成员检验。布谷鸟过滤器支持动态添加和移除项目,同时获得比布卢姆过滤器更高的性能。对于存储许多项目且目标为中等低误检率的应用程序,布谷鸟过滤器的空间开销比空间优化的布谷鸟过滤器低。
要了解布谷鸟过滤器的更多详细信息,请阅读论文。
代码块:
$pip安装buckoopy
或
…代码块:
$pip3安装buckoopy
用法
--
…代码块::python
>;>;import cuckoofilter
>;>;cf=cuckoofilter.cuckoofilter(容量=100,指纹大小=1)
>;>;cf.insert('test')
true
>;cf.contains('test')
>;cf.delete('test')
true
测试
----
要测试包并生成测试覆盖率报告,应运行
。代码块:
$pip install pytest coverage pytest cov
$pytest-v-cov=cuckoofilter--cov report html
代码块:
$pip3 install pytest coverage pytest cov
$python3-m pytest。
license
--
`gpl-3.0 license<;https://github.com/shenaishiren/cuckoofilter/blob/master/license>;``u
此外,该软件包既可用于python2.x,也可用于python3.x。
http://www. cu.EdU/~dGA/PoC/CuCuO-CONExc4.pdf,Bin Fan,David G. Andersen,Michael Kaminsky和Michael D. Mitzenmacher,用于BR/>代替Bloom过滤器进行近似集成员检验。布谷鸟过滤器支持动态添加和移除项目,同时获得比布卢姆过滤器更高的性能。对于存储许多项目且目标为中等低误检率的应用程序,布谷鸟过滤器的空间开销比空间优化的布谷鸟过滤器低。
要了解布谷鸟过滤器的更多详细信息,请阅读论文。
代码块:
$pip安装buckoopy
或
…代码块:
$pip3安装buckoopy
用法
--
…代码块::python
>;>;import cuckoofilter
>;>;cf=cuckoofilter.cuckoofilter(容量=100,指纹大小=1)
>;>;cf.insert('test')
true
>;cf.contains('test')
>;cf.delete('test')
true
测试
----
要测试包并生成测试覆盖率报告,应运行
。代码块:
$pip install pytest coverage pytest cov
$pytest-v-cov=cuckoofilter--cov report html
代码块:
$pip3 install pytest coverage pytest cov
$python3-m pytest。
license
--
`gpl-3.0 license<;https://github.com/shenaishiren/cuckoofilter/blob/master/license>;``u