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 AParamGenerator
apg
protected float
Cmult
protected MatrixSolver
matrixSolver
The solver used for smooth congruence equation systems.protected float
Mmult
protected KnuthSchroeppel
multiplierFinder
protected int
numberOfThreads
protected PowerFinder
powerFinder
Fields 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 PSIQSThreadBase
createThread(int k, java.math.BigInteger N, java.math.BigInteger kN, int d, SieveParams sieveParams, BaseArrays baseArrays, AParamGenerator apg, CongruenceCollector cc, int threadIndex)
java.math.BigInteger
findSingleFactor(java.math.BigInteger N)
Test the current N.abstract java.lang.String
getName()
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, getDefault
Methods 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:
getName
in classFactorAlgorithm
- Returns:
- The name of the algorithm, possibly including important parameters.
-
searchFactors
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 java.math.BigInteger findSingleFactor(java.math.BigInteger N)Test the current N.- Specified by:
findSingleFactor
in 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)
-