![]() |
Python
1.0
|
Namespaces | |
_04d_sieve | |
The Sieve of Eratosthenes (276-194 BC). | |
Functions | |
def | _04d_sieve.setDebug (stat) |
Set debugging on or off. More... | |
def | _04d_sieve.sieve (n) |
Returns a list with all primes up to n. More... | |
def | _04d_sieve.sieve2 (n) |
Memory efficient version, using bitarray. More... | |
def | _04d_sieve.arrayF (n) |
Prepare an array for factorization. More... | |
def | _04d_sieve.factorization (x, F) |
Return the factors of x, given an array with the smallest number that divides each integer (0, if the integer is prime) up to x. More... | |
def | _04d_sieve.printArray (array) |
Print the primes corresponding to a given array. More... | |
def | _04d_sieve.getArray (array) |
Return the primes corresponding to a given array. More... | |
def | _04d_sieve.getTime (dsec) |
Return the time in the format: hr:min:sec:msec. More... | |
def | _04d_sieve.main (argv=None) |
Main program for testing. More... | |
Variables | |
int | _04d_sieve.MAXN = 32000000000 |
Maximum integer value for n. More... | |
int | _04d_sieve.MINN = 1000 |
Value for switching to using sieve2. More... | |
bool | _04d_sieve.debug__ = True |
Debugging state. More... | |