Module: Bloombroom
- Defined in:
- lib/bloombroom/bits/bit_field.rb,
lib/bloombroom.rb,
lib/bloombroom/version.rb,
lib/bloombroom/hash/ffi_fnv.rb,
lib/bloombroom/filter/bloom_filter.rb,
lib/bloombroom/filter/bloom_helper.rb,
lib/bloombroom/bits/bit_bucket_field.rb,
lib/bloombroom/filter/continuous_bloom_filter.rb
Overview
create a bit bucket field of 100 buckets of 4 bits
bf = BitBucketField.new(4, 100)
bf[10] = 5 or bf.set(10, 5)
bf[10] => 5 or bf.get(10) => 5
bf[10] = 0
bf.zero?(10) => true
bf.to_s = "10101000101010101"
bf.to_s(2) = "10101000101010101"
bf.to_s(10) = "5 23 7"
Defined Under Namespace
Classes: BitBucketField, BitField, BloomFilter, BloomHelper, ContinuousBloomFilter, FNVFFI
Constant Summary collapse
- VERSION =
"1.2.0"