
PCJ API Version 1.2 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object bak.pcj.hash.Primes
This class provides a static table of int sized prime numbers. For small numbers (0511) it contains all primes. For larger numbers it contains 32 primes each time the number of bits is increased. I.e., there are 32 primes from 512 to 1023, 32 primes from 1024 to 2048, etc., the primes thus becoming less dense with size. Within the interval formed by using one more bit (say, v0 to v1), the 32 primes are formed by searching for the first prime greater than or equal to v0 + n*(v1v0)/32, n belonging to {0,1,2, ..., 31}. This creates a reasonable distribution.
Method Summary  
static int 
nextPrime(int n)
Returns from a static prime table the least prime that is greater than or equal to a specified value. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Method Detail 
public static int nextPrime(int n)

PCJ API Version 1.2 

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 