Package de.tilman_neumann.jml.factor.ecm
Class EllipticCurveMethod
- java.lang.Object
-
- de.tilman_neumann.jml.factor.FactorAlgorithm
-
- de.tilman_neumann.jml.factor.ecm.EllipticCurveMethod
-
public class EllipticCurveMethod extends FactorAlgorithm
Use Elliptic Curve Method to find the prime number factors of a given BigInteger.
-
-
Field Summary
-
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
DEFAULT, NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit
-
-
Constructor Summary
Constructors Constructor Description EllipticCurveMethod(int maxCurves)
Full constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
computeMaxCurvesForN(BigInteger N)
void
factor(BigInteger N, SortedMultiset<BigInteger> primeFactors)
Decomposes the argument N into prime factors.BigInteger
findSingleFactor(BigInteger N)
Find a single factor of the given N, which is composite and odd.String
getName()
static void
main(String[] args)
void
searchFactors(FactorArguments args, FactorResult result)
Find small factors of some N.-
Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in classFactorAlgorithm
- Returns:
- The name of the algorithm, possibly including important parameters.
-
factor
public void factor(BigInteger N, SortedMultiset<BigInteger> primeFactors)
Description copied from class:FactorAlgorithm
Decomposes the argument N into prime factors.- Overrides:
factor
in classFactorAlgorithm
- Parameters:
N
- Number to factor.primeFactors
- a map to which found factors are added
-
searchFactors
public void searchFactors(FactorArguments args, FactorResult result)
Find small factors of some N. Returns found factors inresult.primeFactors
and eventually some unfactored composites inresult.compositeFactors
.- Overrides:
searchFactors
in classFactorAlgorithm
- Parameters:
args
-result
- the result of the factoring attempt. Should be initialized only once by the caller to reduce overhead.
-
findSingleFactor
public BigInteger findSingleFactor(BigInteger N)
Description copied from class:FactorAlgorithm
Find a single factor of the given N, which is composite and odd.- Specified by:
findSingleFactor
in classFactorAlgorithm
- Returns:
- factor
-
computeMaxCurvesForN
public static int computeMaxCurvesForN(BigInteger N)
-
main
public static void main(String[] args)
-
-