|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.csp.Constant
public class Constant
Constructor Summary | |
---|---|
Constant(int value)
|
Method Summary | |
---|---|
Domain |
domain()
Return the domain of the evaluable. |
void |
toClause(ISolver solver)
Translates a variable over a domain into a set a clauses enforcing that exactly one value must be chosen in the domain. |
java.lang.String |
toString()
|
int |
translate(int key)
Translates a value from the domain into a SAT variable in Dimacs format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constant(int value)
Method Detail |
---|
public Domain domain()
Evaluable
domain
in interface Evaluable
public int translate(int key)
Evaluable
translate
in interface Evaluable
key
- a value from domain()
public void toClause(ISolver solver) throws ContradictionException
Evaluable
toClause
in interface Evaluable
solver
- a solver to feed with the clauses.
ContradictionException
- if a trivial inconsistency is met.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |