Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
 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
Exemple #4
0
 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