public class SatSolver extends Object
(or-tools, booleans.cc, ty L. Perron).
Constructor and Description |
---|
SatSolver() |
Modifier and Type | Method and Description |
---|---|
void |
detachLearnt(int ci) |
boolean |
learnClause(int... ps) |
protected static org.chocosolver.solver.constraints.nary.cnf.SatSolver.Boolean |
makeBoolean(boolean b)
inline Boolean MakeBoolean(bool x) { return Boolean(!
|
protected static int |
makeLiteral(int var,
boolean sign)
inline Literal MakeLiteral(Variable var, bool sign) {
return Literal(2 * var.value() + static_cast
|
static int |
negated(int l)
inline Literal Negated(Literal p) { return Literal(p.value() ^ 1); }
|
int |
newVariable() |
protected static boolean |
sign(int l)
inline bool Sign(Literal p) { return p.value() & 1; }
int(true) is always 1.
|
int |
trailMarker() |
protected static int |
var(int l)
inline Variable Var(Literal p) { return Variable(p.value() >> 1); }
|
protected static org.chocosolver.solver.constraints.nary.cnf.SatSolver.Boolean |
xor(org.chocosolver.solver.constraints.nary.cnf.SatSolver.Boolean a,
boolean b)
inline Boolean Xor(Boolean a, bool b) {
return Boolean((uint8)(a.value() ^ (uint8) b));
}
|
public int newVariable()
public boolean learnClause(int... ps)
public int trailMarker()
public void detachLearnt(int ci)
protected static int makeLiteral(int var, boolean sign)
public static int negated(int l)
protected static boolean sign(int l)
protected static int var(int l)
protected static org.chocosolver.solver.constraints.nary.cnf.SatSolver.Boolean makeBoolean(boolean b)
protected static org.chocosolver.solver.constraints.nary.cnf.SatSolver.Boolean xor(org.chocosolver.solver.constraints.nary.cnf.SatSolver.Boolean a, boolean b)
Copyright © 2015. All rights reserved.