module BloomFilter

Defined in:

bloom_filter.cr
bloom_filter/filter.cr
bloom_filter/version.cr

Constant Summary

VERSION = "0.1.1"

Constructors

Class Method Summary

Constructor Detail

def self.new(bytesize, hash_num) : Filter #

[View source]

Class Method Detail

def self.load(io : IO) : Filter #

[View source]
def self.load_file(file_path) : Filter #

[View source]
def self.new_optimal(n, p) : Filter #

Creates optimal filter based number of items and desired false positive probability.

n - the number of expected elements to be inserted p - desired false positive probability m - bitsize of the filter k - number of hash functions


[View source]