public final class SieveOfAtkin extends Object
Modifier and Type | Method and Description |
---|---|
static SieveOfAtkin |
createSieve(BigInteger limit) |
static SieveOfAtkin |
createSieve(int limit) |
int |
getLimit() |
BigInteger |
getLimitAsBigInteger() |
boolean |
isPrime(int n) |
int |
lastPrime()
Returns the last prime in this sieve
|
int |
randomPrime(org.apache.commons.math3.random.RandomGenerator rnd) |
public boolean isPrime(int n)
public int lastPrime()
public int randomPrime(org.apache.commons.math3.random.RandomGenerator rnd)
public int getLimit()
public BigInteger getLimitAsBigInteger()
public static SieveOfAtkin createSieve(int limit)
public static SieveOfAtkin createSieve(BigInteger limit)
Copyright © 2018. All rights reserved.