Class PartialSolver01
java.lang.Object
de.tilman_neumann.jml.factor.base.congruence.PartialSolver01
- All Implemented Interfaces:
PartialSolver
public class PartialSolver01 extends java.lang.Object implements PartialSolver
A Gaussian solver used to find smooth from partial relations.
-
Constructor Summary
Constructors Constructor Description PartialSolver01()
-
Method Summary
Modifier and Type Method Description void
cleanUp()
Release memory after a factorization.protected java.util.Map<java.lang.Long,java.lang.Integer>
createFactor2ColumnIndexMap(java.util.Map<java.lang.Long,java.util.ArrayList<Partial>> factors_2_partials)
Create a map from factors appearing with odd exponent to matrix column indices.int
getMaxMatrixSize()
java.lang.String
getName()
void
initializeForN()
Initialize this partial solver for a new factor argument.Smooth
solve(java.util.Collection<? extends Partial> congruences)
Solve a partial congruence equation system.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PartialSolver01
public PartialSolver01()
-
-
Method Details
-
getName
public java.lang.String getName()- Specified by:
getName
in interfacePartialSolver
- Returns:
- the name of the algorithm
-
initializeForN
public void initializeForN()Description copied from interface:PartialSolver
Initialize this partial solver for a new factor argument.- Specified by:
initializeForN
in interfacePartialSolver
-
solve
Description copied from interface:PartialSolver
Solve a partial congruence equation system.- Specified by:
solve
in interfacePartialSolver
- Parameters:
congruences
- the partial congruence equation system- Returns:
- list of smooth congruences found
-
createFactor2ColumnIndexMap
protected java.util.Map<java.lang.Long,java.lang.Integer> createFactor2ColumnIndexMap(java.util.Map<java.lang.Long,java.util.ArrayList<Partial>> factors_2_partials)Create a map from factors appearing with odd exponent to matrix column indices.- Parameters:
factors_2_partials
- unsorted map from factors to the congruences in which they appear with odd exponent- Returns:
- map from factors to column indices
-
getMaxMatrixSize
public int getMaxMatrixSize()- Specified by:
getMaxMatrixSize
in interfacePartialSolver
- Returns:
- the size of the biggest partial matrix found for some N
-
cleanUp
public void cleanUp()Description copied from interface:PartialSolver
Release memory after a factorization.- Specified by:
cleanUp
in interfacePartialSolver
-