|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.tools.SolverDecorator org.sat4j.opt.AbstractSelectorVariablesDecorator org.sat4j.opt.WeightedMaxSatDecorator
public class WeightedMaxSatDecorator
Field Summary | |
---|---|
protected int |
top
|
Fields inherited from class org.sat4j.opt.AbstractSelectorVariablesDecorator |
---|
nbnewvar, nborigvars, prevfullmodel |
Constructor Summary | |
---|---|
WeightedMaxSatDecorator(ISolver solver)
|
Method Summary | |
---|---|
IConstr |
addClause(IVecInt literals)
Create a clause from a set of literals The literals are represented by non null integers such that opposite literals a represented by opposite values. |
java.lang.Number |
calculateObjective()
|
void |
discard()
|
boolean |
hasNoObjectiveFunction()
|
boolean |
nonOptimalMeansSatisfiable()
|
void |
reset()
Clean up the internal state of the solver. |
void |
setTopWeight(int top)
|
Methods inherited from class org.sat4j.opt.AbstractSelectorVariablesDecorator |
---|
admitABetterSolution, model, newVar, setExpectedNumberOfClauses |
Methods inherited from class org.sat4j.tools.SolverDecorator |
---|
addAllClauses, addAtLeast, addAtMost, addPseudoBoolean, clearLearntClauses, decorated, findModel, findModel, getStat, getTimeout, isSatisfiable, isSatisfiable, model, nConstraints, newVar, nVars, printStat, printStat, removeConstr, setTimeout, setTimeoutMs, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.sat4j.specs.IOptimizationProblem |
---|
admitABetterSolution |
Methods inherited from interface org.sat4j.specs.IProblem |
---|
findModel, findModel, isSatisfiable, isSatisfiable, model, model, nConstraints, nVars |
Field Detail |
---|
protected int top
Constructor Detail |
---|
public WeightedMaxSatDecorator(ISolver solver)
Method Detail |
---|
public void setTopWeight(int top)
public IConstr addClause(IVecInt literals) throws ContradictionException
ISolver
addClause
in interface ISolver
addClause
in class SolverDecorator
literals
- a set of literals
ContradictionException
- iff the vector of literals is empty or if it contains only
falsified literals after unit propagationISolver.removeConstr(IConstr)
public void reset()
ISolver
reset
in interface ISolver
reset
in class AbstractSelectorVariablesDecorator
public boolean hasNoObjectiveFunction()
hasNoObjectiveFunction
in interface IOptimizationProblem
public boolean nonOptimalMeansSatisfiable()
nonOptimalMeansSatisfiable
in interface IOptimizationProblem
public java.lang.Number calculateObjective()
calculateObjective
in interface IOptimizationProblem
public void discard() throws ContradictionException
discard
in interface IOptimizationProblem
ContradictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |