Class CycleCounter2LP

java.lang.Object
de.tilman_neumann.jml.factor.base.congruence.CycleCounter2LP
All Implemented Interfaces:
CycleCounter

public class CycleCounter2LP
extends java.lang.Object
implements CycleCounter
Cycle counting algorithm implementation for two large primes, following [LM94]. The algorithm is exact for partials with 2 large primes.
  • Constructor Summary

    Constructors
    Constructor Description
    CycleCounter2LP()  
  • Method Summary

    Modifier and Type Method Description
    int addPartial​(Partial partial, int correctSmoothCount)
    Counts the number of independent cycles in the partial relations.
    int getCycleCount()  
    java.util.HashSet<Partial> getPartialRelations()  
    int getPartialRelationsCount()  
    void initializeForN()
    Initialize this cycle counter for a new factor argument.

    Methods inherited from class java.lang.Object

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

    • CycleCounter2LP

      public CycleCounter2LP()
  • Method Details

    • initializeForN

      public void initializeForN()
      Description copied from interface: CycleCounter
      Initialize this cycle counter for a new factor argument.
      Specified by:
      initializeForN in interface CycleCounter
    • addPartial

      public int addPartial​(Partial partial, int correctSmoothCount)
      Description copied from interface: CycleCounter
      Counts the number of independent cycles in the partial relations.
      Specified by:
      addPartial in interface CycleCounter
      Parameters:
      partial - the newest partial relation to add
      correctSmoothCount - the correct number of smooths from partials (only for debugging)
      Returns:
      the updated number of smooths from partials
    • getPartialRelations

      public java.util.HashSet<Partial> getPartialRelations()
      Specified by:
      getPartialRelations in interface CycleCounter
      Returns:
      the partial relations found so far
    • getPartialRelationsCount

      public int getPartialRelationsCount()
      Specified by:
      getPartialRelationsCount in interface CycleCounter
      Returns:
      number of partial relations found so far.
    • getCycleCount

      public int getCycleCount()
      Specified by:
      getCycleCount in interface CycleCounter
      Returns:
      the number of cycles counted by this algorithm