Class SIQS
java.lang.Object
de.tilman_neumann.jml.factor.FactorAlgorithm
de.tilman_neumann.jml.factor.siqs.SIQS
public class SIQS extends FactorAlgorithm
Main class for single-threaded SIQS implementations.
-
Field Summary
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit -
Constructor Summary
Constructors Constructor Description SIQS(float Cmult, float Mmult, java.lang.Integer wantedQCount, PowerFinder powerFinder, SIQSPolyGenerator polyGenerator, Sieve sieve, TDiv_QS auxFactorizer, int extraCongruences, MatrixSolver matrixSolver)Standard constructor. -
Method Summary
Modifier and Type Method Description voidcleanUp()java.math.BigIntegerfindSingleFactor(java.math.BigInteger N)Test the current N.java.lang.StringgetName()static voidmain(java.lang.String[] args)Stand-alone test.voidsearchFactors(FactorArguments args, FactorResult result)Try to find at least one factor of the given args.N, which is composite and odd.Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor, factor, getDefaultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SIQS
public SIQS(float Cmult, float Mmult, java.lang.Integer wantedQCount, PowerFinder powerFinder, SIQSPolyGenerator polyGenerator, Sieve sieve, TDiv_QS auxFactorizer, int extraCongruences, MatrixSolver matrixSolver)Standard constructor.- Parameters:
Cmult- multiplier for prime base sizeMmult- multiplier for sieve array sizewantedQCount- the wanted number of q whose product gives the a-parameterpowerFinder- algorithm to add powers to the primes used for sievingpolyGenerator-sieve- the sieve algorithmauxFactorizer-extraCongruences- the number of surplus congruences we collect to have a greater chance that the equation system solves.matrixSolver- matrix solver for the smooth congruence equation system
-
-
Method Details
-
getName
public java.lang.String getName()- Specified by:
getNamein classFactorAlgorithm- Returns:
- The name of the algorithm, possibly including important parameters.
-
searchFactors
Description copied from class:FactorAlgorithmTry to find at least one factor of the given args.N, which is composite and odd. This is a default implementation for algorithms that will only find a single factor or none at all. For sub-algorithms that may find more factors at once this method should be overwritten appropriately.- Overrides:
searchFactorsin classFactorAlgorithmresult- the result of the factoring attempt. Should be initialized only once by the caller to reduce overhead.
-
findSingleFactor
public java.math.BigInteger findSingleFactor(java.math.BigInteger N)Test the current N.- Specified by:
findSingleFactorin classFactorAlgorithm- Parameters:
N- number to be factored.- Returns:
- factor, or null if no factor was found.
-
cleanUp
public void cleanUp() -
main
public static void main(java.lang.String[] args)Stand-alone test.- Parameters:
args- ignored Some test numbers: 11111111111111111111111111 5679148659138759837165981543 11111111111111111111111111155555555555111111111111111 2900608971182010301486951469292513060638582965350239259380273225053930627446289431038392125 = 33333 * 33335 * 33337 * 33339 * 33341 * 33343 * 33345 * 33347 * 33349 * 33351 * 33353 * 33355 * 33357 * 33359 * 33361 * 33363 * 33367 * 33369 * 33369 * 33371 15841065490425479923 = 2604221509 * 6082841047
-