def load_countgraph(filename): """Load a countgraph object from the given filename and return it. Keyword argument: filename -- the name of the countgraph file """ countgraph = _Countgraph(1, [1]) countgraph.load(filename) return countgraph
def load_countgraph(filename, small=False): """Load a countgraph object from the given filename and return it. Keyword argument: filename -- the name of the countgraph file small -- set this to load a SmallCountgraph instance """ if small: countgraph = _SmallCountgraph(1, [1]) countgraph.load(filename) else: countgraph = _Countgraph(1, [1]) countgraph.load(filename) return countgraph
def __new__(cls, k, starting_size, n_tables): primes = get_n_primes_near_x(n_tables, starting_size) countgraph = _Countgraph(k, primes) class_ = _GraphLabels.__new__(cls, countgraph) class_.graph = countgraph return class_
def __new__(cls, k, starting_size, n_tables): primes = get_n_primes_near_x(n_tables, starting_size) hb = _Countgraph(k, primes) c = _GraphLabels.__new__(cls, hb) c.graph = hb return c