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 intcomputeMaxCurvesForN(BigInteger N)voidfactor(BigInteger N, SortedMultiset<BigInteger> primeFactors)Decomposes the argument N into prime factors.BigIntegerfindSingleFactor(BigInteger N)Find a single factor of the given N, which is composite and odd.StringgetName()static voidmain(String[] args)voidsearchFactors(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:
getNamein classFactorAlgorithm- Returns:
- The name of the algorithm, possibly including important parameters.
-
factor
public void factor(BigInteger N, SortedMultiset<BigInteger> primeFactors)
Description copied from class:FactorAlgorithmDecomposes the argument N into prime factors.- Overrides:
factorin 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.primeFactorsand eventually some unfactored composites inresult.compositeFactors.- Overrides:
searchFactorsin 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:FactorAlgorithmFind a single factor of the given N, which is composite and odd.- Specified by:
findSingleFactorin classFactorAlgorithm- Returns:
- factor
-
computeMaxCurvesForN
public static int computeMaxCurvesForN(BigInteger N)
-
main
public static void main(String[] args)
-
-