Class PSIQSBase
java.lang.Object
de.tilman_neumann.jml.factor.FactorAlgorithm
de.tilman_neumann.jml.factor.psiqs.PSIQSBase
- Direct Known Subclasses:
PSIQS,PSIQS_SB,PSIQS_SB_U,PSIQS_U,PSIQS_U_3LP,PSIQS_U_nLP
public abstract class PSIQSBase extends FactorAlgorithm
Multi-threaded SIQS, the fastest factor algorithm in this project.
-
Field Summary
Fields Modifier and Type Field Description protected AParamGeneratorapgprotected floatCmultprotected MatrixSolvermatrixSolverThe solver used for smooth congruence equation systems.protected floatMmultprotected KnuthSchroeppelmultiplierFinderprotected intnumberOfThreadsprotected PowerFinderpowerFinderFields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit -
Constructor Summary
Constructors Constructor Description PSIQSBase(float Cmult, float Mmult, int numberOfThreads, java.lang.Integer d, PowerFinder powerFinder, MatrixSolver matrixSolver, AParamGenerator apg, CongruenceCollector cc)Standard constructor. -
Method Summary
Modifier and Type Method Description protected abstract PSIQSThreadBasecreateThread(int k, java.math.BigInteger N, java.math.BigInteger kN, int d, SieveParams sieveParams, BaseArrays baseArrays, AParamGenerator apg, CongruenceCollector cc, int threadIndex)java.math.BigIntegerfindSingleFactor(java.math.BigInteger N)Test the current N.abstract java.lang.StringgetName()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
-
Field Details
-
numberOfThreads
protected int numberOfThreads -
multiplierFinder
-
Cmult
protected float Cmult -
apg
-
Mmult
protected float Mmult -
matrixSolver
The solver used for smooth congruence equation systems. -
powerFinder
-
-
Constructor Details
-
PSIQSBase
public PSIQSBase(float Cmult, float Mmult, int numberOfThreads, java.lang.Integer d, PowerFinder powerFinder, MatrixSolver matrixSolver, AParamGenerator apg, CongruenceCollector cc)Standard constructor.- Parameters:
Cmult- multiplier for prime base sizeMmult- multiplier for sieve array sizenumberOfThreads-d- the d-parameter of quadratic polynomials Q(x) = (d*a*x + b)^2 - kN; may be null for automatic derivationpowerFinder- algorithm to add powers to the primes used for sievingmatrixSolver- solver for smooth congruences matrixapg- a-parameter generator
-
-
Method Details
-
getName
public abstract 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.
-
createThread
protected abstract PSIQSThreadBase createThread(int k, java.math.BigInteger N, java.math.BigInteger kN, int d, SieveParams sieveParams, BaseArrays baseArrays, AParamGenerator apg, CongruenceCollector cc, int threadIndex)
-