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 Details

    • numberOfThreads

      protected int numberOfThreads
    • multiplierFinder

      protected KnuthSchroeppel multiplierFinder
    • Cmult

      protected float Cmult
    • apg

      protected AParamGenerator apg
    • Mmult

      protected float Mmult
    • matrixSolver

      protected MatrixSolver matrixSolver
      The solver used for smooth congruence equation systems.
    • powerFinder

      protected PowerFinder 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 size
      Mmult - multiplier for sieve array size
      numberOfThreads -
      d - the d-parameter of quadratic polynomials Q(x) = (d*a*x + b)^2 - kN; may be null for automatic derivation
      powerFinder - algorithm to add powers to the primes used for sieving
      matrixSolver - solver for smooth congruences matrix
      apg - a-parameter generator
  • Method Details

    • getName

      public abstract java.lang.String getName()
      Specified by:
      getName in class FactorAlgorithm
      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 class FactorAlgorithm
      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 class FactorAlgorithm
      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)