|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--lima.mathematical.factorisation.trialdivision.EratosthenesSieve
A class to represent a Sieve of Eratosthenes. Objects of this class are capable of generating prime numbers within a configurable range.
| Nested Class Summary | |
class |
EratosthenesSieve.Iterator
An object of this class is created by a Sieve of Eratosthenes object. |
| Constructor Summary | |
EratosthenesSieve(int sieveLength)
Construct a new Sieve of Eratosthenes object, with the specified sieve length. |
|
| Method Summary | |
boolean |
isComposite(int n)
Determine whether or not the specified integer is composite, with absolute certainty. |
boolean |
isPrime(int n)
Determine whether or not the specified integer is prime, with absolute certainty. |
EratosthenesSieve.Iterator |
iterator()
Create a new iterator object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EratosthenesSieve(int sieveLength)
sieveLength - - the length of sieve to create.| Method Detail |
public boolean isComposite(int n)
n - - the integer to check for compositeness.public boolean isPrime(int n)
n - - the integer to check for primality.public EratosthenesSieve.Iterator iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||