Bloom filter for probabilistic membership testing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+23 -5
+16 -5
README.md
··· 10 10 Internal parameters of the Bloom filter allow to control its false positive rate 11 11 depending on the expected number of elements in it. 12 12 13 - ## Install 13 + ## Installation 14 + 15 + Install with opam: 14 16 17 + ```sh 18 + $ opam install bloom 15 19 ``` 16 - opam install bloom 20 + 21 + If opam cannot find the package, it may not yet be released in the public 22 + `opam-repository`. Add the overlay repository, then install it: 23 + 24 + ```sh 25 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 26 + $ opam update 27 + $ opam install bloom 17 28 ``` 18 29 19 30 Alternatively, you can build from sources with `dune build`. ··· 48 59 let hash = Hashtbl.hash 49 60 end) 50 61 51 - let bf = My_bloom.v ~error_rate:0.01 1000 52 - let () = My_bloom.add bf "hello" 53 - let _ = My_bloom.mem bf "hello" (* true *) 62 + let my_bf = My_bloom.v ~error_rate:0.01 1000 63 + let () = My_bloom.add my_bf "hello" 64 + let _ = My_bloom.mem my_bf "hello" (* true *) 54 65 ``` 55 66 56 67 ### Set operations
+1
bloom.opam
··· 13 13 "ocaml" {>= "5.1"} 14 14 "bitv" {>= "1.4"} 15 15 "alcotest" {>= "1.0" & with-test} 16 + "mdx" {with-test} 16 17 "alcobar" {with-test} 17 18 "odoc" {with-doc} 18 19 ]
+4
dune
··· 1 1 (env 2 2 (dev 3 3 (flags :standard %{dune-warnings}))) 4 + 5 + (mdx 6 + (files README.md) 7 + (libraries bloom))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 (name bloom) 3 4 4 5 (generate_opam_files true) ··· 18 19 (ocaml (>= 5.1)) 19 20 (bitv (>= 1.4)) 20 21 (alcotest (and (>= 1.0) :with-test)) 22 + (mdx :with-test) 21 23 (alcobar :with-test)))