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.- 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 SIQS(float Cmult, float Mmult, Integer wantedQCount, Float maxQRestExponent, PowerFinder powerFinder, SIQSPolyGenerator polyGenerator, Sieve sieve, TDiv_QS auxFactorizer, int extraCongruences, MatrixSolver matrixSolver)
Standard constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
BigInteger
findSingleFactor(BigInteger N)
Test the current N.String
getName()
static void
main(String[] args)
Stand-alone test.void
searchFactors(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
-
-
-
-
Constructor Detail
-
SIQS
public SIQS(float Cmult, float Mmult, Integer wantedQCount, Float maxQRestExponent, 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-parametermaxQRestExponent
- A Q with unfactored rest QRest is considered smooth if QRest <= N^maxQRestExponent. Good values are 0.16..0.19; null means that it is determined automatically.powerFinder
- 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 Detail
-
getName
public String getName()
- Specified by:
getName
in classFactorAlgorithm
- Returns:
- The name of the algorithm, possibly including important parameters.
-
searchFactors
public void searchFactors(FactorArguments args, FactorResult result)
Description copied from class:FactorAlgorithm
Try 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:
searchFactors
in classFactorAlgorithm
result
- the result of the factoring attempt. Should be initialized only once by the caller to reduce overhead.
-
findSingleFactor
public BigInteger findSingleFactor(BigInteger N)
Test the current N.- Specified by:
findSingleFactor
in classFactorAlgorithm
- Returns:
- factor, or null if no factor was found.
-
cleanUp
public void cleanUp()
-
main
public static void main(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
-
-