public abstract class IntegerFormulaBuilder<V>
extends java.lang.Object
IntegerFormulaBuilder
represents an abstract formula builder.Constructor and Description |
---|
IntegerFormulaBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addClause(IntegerClause<V> clause)
Adds the clause to the formula.
|
void |
addClauses(java.util.Collection<IntegerClause<V>> clauses)
Adds the clauses to the formula.
|
void |
addConstraint(IntegerConstraint<V> constraint)
Adds the constraint to the formula.
|
void |
addEquation(IntegerEquation<V> equation)
Adds the equation to the formula.
|
void |
addEquation(V var,
java.math.BigInteger val,
boolean equal)
Adds the equality
var == val or inequality var != val to the formula. |
void |
addEquation(V lhs,
V rhs,
boolean equal)
Adds the equality
lhs == rhs or inequality lhs != rhs to the formula. |
void |
addFormula(IntegerFormula<V> formula)
Adds the sub-formula to the formula.
|
abstract IntegerFormulaBuilder<V> |
clone() |
public final void addConstraint(IntegerConstraint<V> constraint)
constraint
- the constraint to be added.java.lang.IllegalArgumentException
- if constraint
is null.public final void addFormula(IntegerFormula<V> formula)
formula
- the sub-formula to be added.java.lang.IllegalArgumentException
- if formula
is null.public final void addClauses(java.util.Collection<IntegerClause<V>> clauses)
clauses
- the clauses to be added.java.lang.IllegalArgumentException
- if clauses
is null.public final void addEquation(IntegerEquation<V> equation)
equation
- the equation to be added.java.lang.IllegalArgumentException
- if equation
is null.public void addEquation(V lhs, V rhs, boolean equal)
lhs == rhs
or inequality lhs != rhs
to the formula.lhs
- the left-hand-side variable.rhs
- the right-hand-side variable.equal
- the equality/inequality flag.java.lang.IllegalArgumentException
- if lhs
or rhs
is null.public void addEquation(V var, java.math.BigInteger val, boolean equal)
var == val
or inequality var != val
to the formula.var
- the left-hand-side variable.val
- the right-hand-side value.equal
- the equality/inequality flag.java.lang.IllegalArgumentException
- if var
or val
is null.public abstract void addClause(IntegerClause<V> clause)
clause
- the clause to be added.java.lang.IllegalArgumentException
- if clause
is null.public abstract IntegerFormulaBuilder<V> clone()
clone
in class java.lang.Object