TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What are Bloom Filters?

6 pointsby nikantalmost 10 years ago

2 comments

pvaldesalmost 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 &quot;100% probability of not in the set&quot;, if your item is in the set you obtain instead a &quot;maybe in the collection&quot;.<p><pre><code> (ql:quickload &quot;cl-bloom&quot;) (in-package :cl-bloom) (setf *mydiet* (make-filter :CAPACITY 256 :false-drop-rate *FALSE-DROP-RATE*) ;; default false-drop-rate = 1&#x2F;1000 ;; returns #&lt;BLOOM-FILTER #x000325FC7B028&gt; (add *mydiet* &quot;hamburguer&quot;) ;; add lots of items, returns NIL (add *mydiet* &quot;salad&quot;) ;; ask if an element is yet in the collection (memberp *mydiet* &quot;hamburguer&quot;) ;; T (I can be wrong) (memberp *mydiet* &quot;orange&quot;);; NIL (definitely not)</code></pre>
akras14almost 10 years ago
Corsera has a course from Stanford on Algorithm Design. They explain it really well there.