public class Primality
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.math.BigInteger |
countExponent(java.math.BigInteger val,
java.math.BigInteger base)
Get the highest exponent of base (greater than 1) that divides val.
|
static java.math.BigInteger |
countPrimes1021(java.math.BigInteger val,
java.util.Map<java.lang.Integer,java.lang.Integer> map)
Factor the given value into primes less equal than 1021.
|
static java.math.BigInteger |
countPrimes32749(java.math.BigInteger val,
java.util.Map<java.lang.Integer,java.lang.Integer> map)
Factor the given value into primes less than
Short.MAX_VALUE . |
static void |
pollardRhoFactors(java.math.BigInteger val,
java.util.Map<java.math.BigInteger,java.lang.Integer> map) |
public static java.math.BigInteger countPrimes1021(java.math.BigInteger val, java.util.Map<java.lang.Integer,java.lang.Integer> map)
val
- a BigInteger value which should be factored by all primes less equal than 1021map
- a map which counts the prime integer factors less equal than 1021public static java.math.BigInteger countPrimes32749(java.math.BigInteger val, java.util.Map<java.lang.Integer,java.lang.Integer> map)
Short.MAX_VALUE
.val
- a BigInteger value which should be factored by all primes less equal than 1021map
- a map which counts the prime integer factors less equal than 32749public static java.math.BigInteger countExponent(java.math.BigInteger val, java.math.BigInteger base)
val
- a BigInteger valuebase
- a base greater than 1public static void pollardRhoFactors(java.math.BigInteger val, java.util.Map<java.math.BigInteger,java.lang.Integer> map)