Package net.hydromatic.morel.util
Class Sat
java.lang.Object
net.hydromatic.morel.util.Sat
Boolean satisfiability.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class"And" term.private static classAssignment of a variable to a value.(package private) static classTerm that has a variable number of arguments ("and" or "or").(package private) static class"Not" term.private static enumOperator (or type of term), with its left and right precedence and print name.(package private) static class"Or" term.static classBase class for all terms (variables, and, or, not).static classVariable. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final Map<Integer, Sat.Variable> private final Map<String, Sat.Variable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map<Sat.Variable, Boolean> Finds an assignment of variables such that a term evaluates to true, or null if there is no solution.
-
Field Details
-
variablesById
-
variablesByName
-
nextVariable
private int nextVariable
-
-
Constructor Details
-
Sat
public Sat()
-
-
Method Details
-
solve
Finds an assignment of variables such that a term evaluates to true, or null if there is no solution. -
variable
-
not
-
and
-
and
-
or
-
or
-