Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimhester/bloom
R Bloom filter implementation using Rcpp bindings for dabloom.
https://github.com/jimhester/bloom
Last synced: about 2 months ago
JSON representation
R Bloom filter implementation using Rcpp bindings for dabloom.
- Host: GitHub
- URL: https://github.com/jimhester/bloom
- Owner: jimhester
- License: other
- Created: 2014-12-05T17:46:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-15T02:48:01.000Z (about 10 years ago)
- Last Synced: 2024-06-11T18:18:08.333Z (6 months ago)
- Language: C
- Homepage:
- Size: 160 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output:
md_document:
variant: markdown_github
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# bloom #Scaling, counting Bloom filter for R using Rcpp bindings for
[dablooms](https://github.com/bitly/dablooms/).Note the dablooms implementation requires an additional metadata id for
insertions and deletions. This id is a monotonically increasing integer which
is used to determine which scaling filter the item should be added or removed
from.### Example usage
```{r}
library(bloom)
bloom <- bloom(capacity = 1000, error_rate = .05, filename = "/tmp/bloom.bin")
bloom$add("foo", 2)
bloom$contains("bar")
bloom$contains("foo")
bloom$remove("foo", 2)
bloom$contains("foo")
bloom$add("foo", 2)
rm(bloom)
bloom <- bloom(capacity = 1000, error_rate = .05, filename = "/tmp/bloom.bin", exists = TRUE)
bloom$contains("foo")
```