public class Prime
extends Object
Modifier and Type | Field and Description |
---|---|
private static int[] |
primeList
A handy quick-reference table of primes 1 .. 2^31, spaced evenly in a
logarithmic sense.
|
Constructor and Description |
---|
Prime() |
Modifier and Type | Method and Description |
---|---|
static int |
findAfter(int n)
Determines a prime number greater than n, but not too much greater.
|
private static BitSet |
makePrimeSet(int n)
Makes a bit set of primes below n.
|
static void |
printPrimeList(int n,
float v)
Print a list of primes 1..n, evenly spaced at intervals v
|
private static int[] primeList
public static int findAfter(int n)
private static BitSet makePrimeSet(int n)
public static void printPrimeList(int n, float v)