public class FirstOrderConjunction extends FirstOrderNAryConstraint
children
Constructor and Description |
---|
FirstOrderConjunction(FirstOrderConstraint c1,
FirstOrderConstraint c2)
If either of the arguments is itself a
FirstOrderConjunction , its contents are
flattened into this FirstOrderConjunction . |
Modifier and Type | Method and Description |
---|---|
void |
add(FirstOrderConstraint c)
If the given constraint has the same type as this constraint, its terms are merged into this
constraint; otherwise, it is added as a new term.
|
boolean |
equals(Object o)
Two
FirstOrderConjunction s are equivalent when they are topologically
equivalent, respecting the associativity and commutivity of disjunction. |
boolean |
evaluate()
Determines whether the constraint is satisfied.
|
int |
hashCode()
The hash code of a
FirstOrderConjunction is the sum of the hash codes of its
children plus one. |
PropositionalConstraint |
propositionalize()
Transforms this first order constraint into a propositional constraint.
|
void |
runVisit(Inference infer)
Calls the appropriate
visit(·) method of the given Inference
for this Constraint , as per the visitor pattern. |
consolidateVariables, contains, getChildren, setQuantificationVariables, size
public FirstOrderConjunction(FirstOrderConstraint c1, FirstOrderConstraint c2)
FirstOrderConjunction
, its contents are
flattened into this FirstOrderConjunction
.c1
- One constraint to disjunct.c2
- Another constraint to disjunct.public void add(FirstOrderConstraint c)
add
in class FirstOrderNAryConstraint
c
- The constraint to add.public boolean evaluate()
evaluate
in class Constraint
public PropositionalConstraint propositionalize()
propositionalize
in class FirstOrderConstraint
public int hashCode()
FirstOrderConjunction
is the sum of the hash codes of its
children plus one.public boolean equals(Object o)
FirstOrderConjunction
s are equivalent when they are topologically
equivalent, respecting the associativity and commutivity of disjunction.public void runVisit(Inference infer)
visit(·)
method of the given Inference
for this Constraint
, as per the visitor pattern.runVisit
in class Constraint
infer
- The inference visiting this constraint.Copyright © 2016. All rights reserved.