T
- public class ClausalCardinalitiesDecorator<T extends ISolver> extends SolverDecorator<T>
Constructor and Description |
---|
ClausalCardinalitiesDecorator(T solver) |
ClausalCardinalitiesDecorator(T solver,
EncodingStrategyAdapter encodingAd) |
Modifier and Type | Method and Description |
---|---|
IConstr |
addAtLeast(IVecInt literals,
int k)
Create a cardinality constraint of the type "at least n of those literals
must be satisfied"
|
IConstr |
addAtMost(IVecInt literals,
int k)
Create a cardinality constraint of the type "at most n of those literals
must be satisfied"
|
IConstr |
addExactly(IVecInt literals,
int k)
Create a cardinality constraint of the type
"exactly n of those literals must be satisfied".
|
String |
toString() |
String |
toString(String prefix)
Display a textual representation of the solver configuration.
|
addAllClauses, addBlockingClause, addClause, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSatisfiable, isSatisfiable, isSatisfiable, isSatisfiable, isSolverKeptHot, isVerbose, model, model, modelWithInternalVariables, nConstraints, newVar, newVar, nextFreeVarId, nVars, primeImplicant, primeImplicant, printInfos, printInfos, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setVerbose, unsatExplanation
public ClausalCardinalitiesDecorator(T solver)
public ClausalCardinalitiesDecorator(T solver, EncodingStrategyAdapter encodingAd)
public IConstr addAtLeast(IVecInt literals, int k) throws ContradictionException
ISolver
addAtLeast
in interface ISolver
addAtLeast
in class SolverDecorator<T extends ISolver>
literals
- a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.k
- the degree (n) of the cardinality constraintContradictionException
- iff the vector of literals is empty or if degree literals are
not remaining unfalsified after unit propagationISolver.removeConstr(IConstr)
public IConstr addAtMost(IVecInt literals, int k) throws ContradictionException
ISolver
addAtMost
in interface ISolver
addAtMost
in class SolverDecorator<T extends ISolver>
literals
- a set of literals The vector can be reused since the solver is
not supposed to keep a reference to that vector.k
- the degree (n) of the cardinality constraintContradictionException
- iff the vector of literals is empty or if it contains more
than degree satisfied literals after unit propagationISolver.removeConstr(IConstr)
public IConstr addExactly(IVecInt literals, int k) throws ContradictionException
ISolver
addExactly
in interface ISolver
addExactly
in class SolverDecorator<T extends ISolver>
literals
- a set of literals. The vector can be reused since the solver
is not supposed to keep a reference to that vector.k
- the number of literals that must be satisfiedContradictionException
- iff the constraint is trivially unsatisfiable.public String toString()
toString
in class SolverDecorator<T extends ISolver>
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.