aarondb/algo/bloom

Types

pub type BloomFilter {
  BloomFilter(bits: BitArray, size: Int, hash_count: Int)
}

Constructors

  • BloomFilter(bits: BitArray, size: Int, hash_count: Int)

Values

pub fn insert(filter: BloomFilter, key: String) -> BloomFilter

Insert a key into the Bloom filter.

pub fn might_contain(filter: BloomFilter, key: String) -> Bool

Check if a key might be in the set.

pub fn new(size_bits: Int, hash_count: Int) -> BloomFilter

Create a new Bloom Filter with specified size (in bits) and number of hash functions.

Search Document