Class Sieve03gU

java.lang.Object
de.tilman_neumann.jml.factor.siqs.sieve.Sieve03gU
All Implemented Interfaces:
Sieve

public class Sieve03gU
extends java.lang.Object
implements Sieve
Derivative of Sieve03g holding the sieve array in native memory. Both the sieve core and the collect phase are notably faster than in Sieve03g !
  • Constructor Summary

    Constructors
    Constructor Description
    Sieve03gU()  
  • Method Summary

    Modifier and Type Method Description
    void cleanUp()
    Release memory after a factorization.
    java.lang.String getName()  
    SieveReport getReport()  
    void initializeForAParameter​(int d, java.math.BigInteger daParam, SolutionArrays solutionArrays, int filteredBaseSize, int[] qArray)
    Set (filtered) prime base and smallest x1, x2 solutions for a new a-parameter.
    void initializeForN​(SieveParams sieveParams, BaseArrays baseArrays, int mergedBaseSize)
    Initialize for a new N.
    void setBParameter​(java.math.BigInteger b)
    Pass the b-parameter to the sieve.
    java.lang.Iterable<SmoothCandidate> sieve()
    Sieve for a new set of x1, x2 solutions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Sieve03gU

      public Sieve03gU()
  • Method Details

    • getName

      public java.lang.String getName()
      Specified by:
      getName in interface Sieve
      Returns:
      the name of this sieve algorithm
    • initializeForN

      public void initializeForN​(SieveParams sieveParams, BaseArrays baseArrays, int mergedBaseSize)
      Description copied from interface: Sieve
      Initialize for a new N. In PSIQS, this method is called for each thread, so things that can be computed before should be computed before.
      Specified by:
      initializeForN in interface Sieve
      Parameters:
      sieveParams - basic sieve parameters for a new N
      baseArrays - the prime base, modular sqrt's, logP-values etc. before filtering out the q-parameters
      mergedBaseSize - size of the prime base (after eventually merging primes and powers), before filtering q-parameters
    • initializeForAParameter

      public void initializeForAParameter​(int d, java.math.BigInteger daParam, SolutionArrays solutionArrays, int filteredBaseSize, int[] qArray)
      Description copied from interface: Sieve
      Set (filtered) prime base and smallest x1, x2 solutions for a new a-parameter.
      Specified by:
      initializeForAParameter in interface Sieve
      Parameters:
      d - 2 if (kN == 1) (mod 8), 1 otherwise
      daParam - d*a, where 'a' is the a-parameter and d=2 if kN==1 (mod 8), d=1 else
      filteredBaseSize - number of primes and powers use for sieving
      qArray - the q-parameters whose product is the a-parameter
    • setBParameter

      public void setBParameter​(java.math.BigInteger b)
      Description copied from interface: Sieve
      Pass the b-parameter to the sieve.
      Specified by:
      setBParameter in interface Sieve
    • sieve

      public java.lang.Iterable<SmoothCandidate> sieve()
      Description copied from interface: Sieve
      Sieve for a new set of x1, x2 solutions.
      Specified by:
      sieve in interface Sieve
      Returns:
      (something like a) list of sieve locations x where Q(x) is smooth enough to be passed to trial division
    • getReport

      public SieveReport getReport()
      Specified by:
      getReport in interface Sieve
      Returns:
      description of the durations of the individual sub-phases
    • cleanUp

      public void cleanUp()
      Description copied from interface: Sieve
      Release memory after a factorization.
      Specified by:
      cleanUp in interface Sieve