Class CongruenceCollector

  • Direct Known Subclasses:
    CongruenceCollectorParallel

    public class CongruenceCollector
    extends Object
    Collects smooth and partial congruences, and assembles partials to smooth congruences on-the-fly. Partials may have any number of large factors.
    Author:
    Tilman Neumann
    • Constructor Detail

      • CongruenceCollector

        public CongruenceCollector()
    • Method Detail

      • initialize

        public void initialize​(BigInteger N,
                               FactorTest factorTest)
        Initialize congruence collector for a new N.
        Parameters:
        N -
        factorTest -
      • add

        public boolean add​(AQPair aqPair)
                    throws FactorException
        Add a new elementary partial or smooth congruence.
        Parameters:
        aqPair -
        Returns:
        true if a smooth congruence was added
        Throws:
        FactorException
      • addSmooth

        protected boolean addSmooth​(Smooth smoothCongruence)
                             throws FactorException
        Add smooth congruence.
        Parameters:
        smoothCongruence -
        Returns:
        true if a smooth congruence was added
        Throws:
        FactorException
      • getSmoothCongruenceCount

        public int getSmoothCongruenceCount()
        Returns:
        number of smooth congruences found so far.
      • getSmoothCongruences

        public ArrayList<Smooth> getSmoothCongruences()
        Returns:
        smooth congruences found so far.
      • getPartialCongruenceCount

        public int getPartialCongruenceCount()
        Returns:
        number of partial congruences found so far.
      • getCycleCountResult

        public String getCycleCountResult()
      • cleanUp

        public void cleanUp()
        Release memory after a factorization.