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 intaddPartial(Partial partial, int correctSmoothCount)Counts the number of independent cycles in the partial relations.intgetCycleCount()java.util.HashSet<Partial>getPartialRelations()intgetPartialRelationsCount()voidinitializeForN()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:CycleCounterInitialize this cycle counter for a new factor argument.- Specified by:
initializeForNin interfaceCycleCounter
-
addPartial
Description copied from interface:CycleCounterCounts the number of independent cycles in the partial relations.- Specified by:
addPartialin interfaceCycleCounter- Parameters:
partial- the newest partial relation to addcorrectSmoothCount- the correct number of smooths from partials (only for debugging)- Returns:
- the updated number of smooths from partials
-
getPartialRelations
- Specified by:
getPartialRelationsin interfaceCycleCounter- Returns:
- the partial relations found so far
-
getPartialRelationsCount
public int getPartialRelationsCount()- Specified by:
getPartialRelationsCountin interfaceCycleCounter- Returns:
- number of partial relations found so far.
-
getCycleCount
public int getCycleCount()- Specified by:
getCycleCountin interfaceCycleCounter- Returns:
- the number of cycles counted by this algorithm
-