Ejemplo n.º 1
0
def primeMoreThan(n):
    if n not in cache_prime.keys():
        cache_prime[n] = primes.primeMoreThan(4 * n)
    return cache_prime[n]
 def __init__(self, dom, k = 2):
     self.dom = dom
     self.p = primes.primeMoreThan(2 * dom)
     self.coeffs = [random.randint(0, self.p - 1) for i in xrange(k)]
def primeMoreThan(n):
    if n not in cache_prime.keys():
        cache_prime[n] = primes.primeMoreThan(4 * n)
    return cache_prime[n]
Ejemplo n.º 4
0
 def __init__(self, dom, k=2):
     self.dom = dom
     self.p = primes.primeMoreThan(2 * dom)
     self.coeffs = [random.randint(0, self.p - 1) for i in xrange(k)]