Class PSIQSBase
- java.lang.Object
-
- de.tilman_neumann.jml.factor.FactorAlgorithm
-
- de.tilman_neumann.jml.factor.psiqs.PSIQSBase
-
- Direct Known Subclasses:
PSIQS
,PSIQS_SBH_U
,PSIQS_U
public abstract class PSIQSBase extends FactorAlgorithm
Multi-threaded SIQS, the fastest factor algorithm in this project.- Author:
- Tilman Neumann
-
-
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
maxQRestExponent
protected float
Mmult
protected KnuthSchroeppel
multiplierFinder
protected int
numberOfThreads
protected PowerFinder
powerFinder
-
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
DEFAULT, NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit
-
-
Constructor Summary
Constructors Constructor Description PSIQSBase(float Cmult, float Mmult, Float maxQRestExponent, int numberOfThreads, Integer d, PowerFinder powerFinder, MatrixSolver matrixSolver, AParamGenerator apg)
Standard constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract PSIQSThreadBase
createThread(int k, BigInteger N, BigInteger kN, int d, SieveParams sieveParams, BaseArrays baseArrays, AParamGenerator apg, CongruenceCollectorParallel cc, int threadIndex)
BigInteger
findSingleFactor(BigInteger N)
Test the current N.abstract 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
-
-
-
-
Field Detail
-
numberOfThreads
protected int numberOfThreads
-
multiplierFinder
protected KnuthSchroeppel multiplierFinder
-
Cmult
protected float Cmult
-
apg
protected AParamGenerator apg
-
Mmult
protected float Mmult
-
maxQRestExponent
protected float maxQRestExponent
-
matrixSolver
protected MatrixSolver matrixSolver
The solver used for smooth congruence equation systems.
-
powerFinder
protected PowerFinder powerFinder
-
-
Constructor Detail
-
PSIQSBase
public PSIQSBase(float Cmult, float Mmult, Float maxQRestExponent, int numberOfThreads, Integer d, PowerFinder powerFinder, MatrixSolver matrixSolver, AParamGenerator apg)
Standard constructor.- Parameters:
Cmult
- multiplier for prime base sizeMmult
- multiplier for sieve array sizemaxQRestExponent
- 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.numberOfThreads
-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 Detail
-
getName
public abstract 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.
-
createThread
protected abstract PSIQSThreadBase createThread(int k, BigInteger N, BigInteger kN, int d, SieveParams sieveParams, BaseArrays baseArrays, AParamGenerator apg, CongruenceCollectorParallel cc, int threadIndex)
-
-