Class CongruenceCollector
- java.lang.Object
-
- de.tilman_neumann.jml.factor.base.congruence.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
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
COUNT_CYCLES
-
Constructor Summary
Constructors Constructor Description CongruenceCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(AQPair aqPair)
Add a new elementary partial or smooth congruence.protected boolean
addSmooth(Smooth smoothCongruence)
Add smooth congruence.void
cleanUp()
Release memory after a factorization.String
getCycleCountResult()
int
getPartialCongruenceCount()
CongruenceCollectorReport
getReport()
int
getSmoothCongruenceCount()
ArrayList<Smooth>
getSmoothCongruences()
void
initialize(BigInteger N, FactorTest factorTest)
Initialize congruence collector for a new N.
-
-
-
Field Detail
-
COUNT_CYCLES
public static final boolean COUNT_CYCLES
- See Also:
- Constant Field Values
-
-
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.
-
getReport
public CongruenceCollectorReport getReport()
-
getCycleCountResult
public String getCycleCountResult()
-
cleanUp
public void cleanUp()
Release memory after a factorization.
-
-