Class TDiv31
- java.lang.Object
-
- de.tilman_neumann.jml.factor.FactorAlgorithm
-
- de.tilman_neumann.jml.factor.tdiv.TDiv31
-
public class TDiv31 extends FactorAlgorithm
Trial division factor algorithm using the safe AutoExpandingPrimesArray class.- Author:
- Tilman Neumann
-
-
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 TDiv31()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
factor(BigInteger Nbig, SortedMultiset<BigInteger> primeFactors)
Decomposes the argument N into prime factors.int
findSingleFactor(int N)
BigInteger
findSingleFactor(BigInteger N)
Find a single factor of the given N, which is composite and odd.String
getName()
-
Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor, searchFactors
-
-
-
-
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 Nbig, SortedMultiset<BigInteger> primeFactors)
Description copied from class:FactorAlgorithm
Decomposes the argument N into prime factors.- Overrides:
factor
in classFactorAlgorithm
- Parameters:
Nbig
- Number to factor.primeFactors
- a map to which found factors are added
-
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
-
findSingleFactor
public int findSingleFactor(int N)
-
-