|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.arith.PrimeList
public final class PrimeList
List of big primes. Provides an Iterator for generating prime numbers. Similar to ALDES/SAC2 SACPOL.PRIME list.
Field Summary | |
---|---|
protected static java.util.List<java.math.BigInteger> |
val
The list of probable primes. |
Constructor Summary | |
---|---|
PrimeList()
Constructor for PrimeList. |
|
PrimeList(int n)
Constructor for PrimeList with n primes. |
Method Summary | |
---|---|
protected static boolean |
checkPrimes()
Check if the list contains really prime numbers. |
java.math.BigInteger |
get(int i)
get prime at index i. |
protected static java.math.BigInteger |
getLongPrime(int n,
int m)
Method to compute a prime as 2**n - m. |
java.util.Iterator<java.math.BigInteger> |
iterator()
Iterator. |
int |
size()
size of current list. |
java.lang.String |
toString()
toString. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.util.List<java.math.BigInteger> val
Constructor Detail |
---|
public PrimeList()
public PrimeList(int n)
n
- initial number of primes.Method Detail |
---|
protected static java.math.BigInteger getLongPrime(int n, int m)
n
- power for 2.m
- for 2**n - m.protected static boolean checkPrimes()
public java.lang.String toString()
toString
in class java.lang.Object
public int size()
public java.math.BigInteger get(int i)
public java.util.Iterator<java.math.BigInteger> iterator()
iterator
in interface java.lang.Iterable<java.math.BigInteger>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |