Class PollardRhoBrent31
java.lang.Object
de.tilman_neumann.jml.factor.FactorAlgorithm
de.tilman_neumann.jml.factor.pollardRho.PollardRhoBrent31
public class PollardRhoBrent31 extends FactorAlgorithm
Brents's improvement of Pollard's Rho algorithm, following [Richard P. Brent: An improved Monte Carlo Factorization Algorithm, 1980].
31 bit version.
-
Field Summary
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit -
Constructor Summary
Constructors Constructor Description PollardRhoBrent31() -
Method Summary
Modifier and Type Method Description intfindSingleFactor(int N)java.math.BigIntegerfindSingleFactor(java.math.BigInteger N)Find a single factor of the given N, which is composite and odd.java.lang.StringgetName()static voidmain(java.lang.String[] args)Test.Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor, factor, getDefault, searchFactorsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PollardRhoBrent31
public PollardRhoBrent31()
-
-
Method Details
-
getName
public java.lang.String getName()- Specified by:
getNamein classFactorAlgorithm- Returns:
- The name of the algorithm, possibly including important parameters.
-
findSingleFactor
public java.math.BigInteger findSingleFactor(java.math.BigInteger N)Description copied from class:FactorAlgorithmFind a single factor of the given N, which is composite and odd.- Specified by:
findSingleFactorin classFactorAlgorithm- Parameters:
N- number to be factored.- Returns:
- factor
-
findSingleFactor
public int findSingleFactor(int N) -
main
public static void main(java.lang.String[] args)Test.- Parameters:
args- ignored
-