rbloomfilter / 0.4.2
| Short description: | A simple ruby Bloom filter | |||||||
|---|---|---|---|---|---|---|---|---|
| Category: | Library/Datastructure | |||||||
| Status: | beta | |||||||
| Created: | 2006-03-05 03:39:55 GMT | |||||||
| Last update: | 2006-03-17 05:27:30 GMT | |||||||
| Owner: | andrew (Projects of this owner) | |||||||
| Homepage: | http://stuff.siaris.net/index.cgi/code/ | |||||||
| Download: | http://stuff.siaris.net/code/ruby/BloomFilter.tar.gz | |||||||
| License: | Ruby's | |||||||
| Dependency: |
|
|||||||
| Description: | BloomFilterBloomFilter — A class for making bloomfilters Synopsis
#!/usr/bin/ruby -w
require 'bloomfilter'
bf = BloomFilter.new(1000, 0.01) # 1000 keys, 1% false-positives
bf.add("foo")
puts "Yup" if bf.has?("foo")
Requirements
Recommended:
BloomFilter will try to load BitSet and if that fails it will fall back to an included, but limited/slower SimpleVector library — this included slow library is not suitable for anything more than just playing around. darcsYou can also grab the source from my darcs repository: darcs get http://repos.siaris.net/ruby/BloomFilter |
|||||||
| Versions: | [0.4.2 (2006-03-17)] [0.4.1 (2006-03-05)] | |||||||