Skip to content

Instantly share code, notes, and snippets.

View tylerwx51's full-sized avatar

Tyler White tylerwx51

View GitHub Profile
@tylerwx51
tylerwx51 / bloom.py
Created June 27, 2018 23:20
Bloom Blog
class Bloom:
def __init__(self, m, k):
self.info = np.zeros(m, dtype='bool')
self.k = k
def insert(self, x):
f = double_hash(x, self.k, self.info.shape[0])
self.info[f] = True
def is_in(self, x):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.