-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
40 lines (34 loc) · 979 Bytes
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
output:
md_document:
variant: markdown_github
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{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")
```