Commit 0cb6972c authored by leberre's avatar leberre

Temporary fix for SAT-87: the MinWatchCard data structure does not scale well...

Temporary fix for SAT-87: the MinWatchCard data structure does not scale well in case of repeated calls to the solver => need to investigate it further. 

git-svn-id: svn+ssh://svn.forge.ow2.org/svnroot/sat4j/maven/trunk@1735 ba638df5-4473-46d1-82f8-c3ae2a17a6e1
parent f28b10e7
......@@ -35,7 +35,6 @@ import java.math.BigInteger;
import org.sat4j.core.Vec;
import org.sat4j.core.VecInt;
import org.sat4j.minisat.constraints.card.AtLeast;
import org.sat4j.minisat.constraints.card.MinWatchCard;
import org.sat4j.minisat.core.Constr;
import org.sat4j.minisat.core.ILits;
import org.sat4j.minisat.core.UnitPropagationListener;
......@@ -46,20 +45,21 @@ import org.sat4j.specs.IVecInt;
public class MinCardConstructor implements ICardConstructor {
public Constr constructCard(UnitPropagationListener solver, ILits voc,
IVecInt theLits, int degree) throws ContradictionException {
return MinWatchCard.minWatchCardNew(solver, voc, theLits,
MinWatchCard.ATLEAST, degree);
}
public Constr constructCard(UnitPropagationListener solver, ILits voc,
IVecInt theLits, int degree) throws ContradictionException {
return new AtLeast(voc, theLits, degree); // MinWatchCard.minWatchCardNew(solver,
// voc, theLits,
// MinWatchCard.ATLEAST, degree);
}
public Constr constructLearntCard(ILits voc, IDataStructurePB dspb) {
IVecInt resLits = new VecInt();
IVec<BigInteger> resCoefs = new Vec<BigInteger>();
dspb.buildConstraintFromConflict(resLits, resCoefs);
return new AtLeast(voc, resLits, dspb.getDegree().intValue());// MinWatchCard(voc,
// resLits,
// true,
// dspb.getDegree().intValue());
}
public Constr constructLearntCard(ILits voc, IDataStructurePB dspb) {
IVecInt resLits = new VecInt();
IVec<BigInteger> resCoefs = new Vec<BigInteger>();
dspb.buildConstraintFromConflict(resLits, resCoefs);
return new AtLeast(voc, resLits, dspb.getDegree().intValue());// MinWatchCard(voc,
// resLits,
// true,
// dspb.getDegree().intValue());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment