Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
 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_
Ejemplo n.º 6
0
 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_
Ejemplo n.º 7
0
 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
 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