Settings

Theme

What are Bloom Filters?

medium.com

6 points by nikant 10 years ago · 2 comments

Reader

pvaldes 10 years ago

Is a data structure (based in probability) that can be used to do queries about if an item is in a set. If the item is not in the collection you obtain a "100% probability of not in the set", if your item is in the set you obtain instead a "maybe in the collection".

  (ql:quickload "cl-bloom")
  (in-package :cl-bloom) 

  (setf *mydiet* (make-filter  :CAPACITY 256 :false-drop-rate *FALSE-DROP-RATE*) 
      ;; default false-drop-rate = 1/1000
      ;; returns #<BLOOM-FILTER #x000325FC7B028>
 
  (add  *mydiet* "hamburguer") ;; add lots of items, returns NIL
  (add  *mydiet* "salad")

  ;; ask if an element is yet in the collection

  (memberp *mydiet* "hamburguer") ;; T (I can be wrong)
  (memberp *mydiet* "orange");; NIL (definitely not)
akras14 10 years ago

Corsera has a course from Stanford on Algorithm Design. They explain it really well there.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection