def load_counting_hash(filename): """Load a counting_hash object from the given filename and return it. Keyword argument: filename -- the name of the counting_hash file """ hashtable = _CountingHash(1, [1]) hashtable.load(filename) return hashtable
def __new__(cls, k, starting_size, n_tables): primes = get_n_primes_near_x(n_tables, starting_size) hb = _CountingHash(k, primes) c = _LabelHash.__new__(cls, hb) c.graph = hb return c