public class FirstOrderNegation extends FirstOrderConstraint
| Modifier and Type | Field and Description |
|---|---|
protected FirstOrderConstraint |
constraint
The constraint that the negation is applied to.
|
| Constructor and Description |
|---|
FirstOrderNegation(FirstOrderConstraint c)
Initializing constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consolidateVariables(AbstractMap m)
Replaces all unquantified variables with the unique copy stored as a value of the given map;
also instantiates all quantified variables and stores them in the given map.
|
boolean |
equals(Object o)
Two
FirstOrderNegations are equivalent when their constraints are equivalent. |
boolean |
evaluate()
Determines whether the constraint is satisfied.
|
Constraint[] |
getChildren()
Returns the children of this constraint in an array.
|
int |
hashCode()
The hash code of a
FirstOrderNegation is the hash code of its child constraint
plus 1. |
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. |
void |
setQuantificationVariables(Vector o)
This method sets the given quantification variables to the given object references and
evaluates the expressions involving those variables in this constraint's
FirstOrderEquality children. |
protected FirstOrderConstraint constraint
public FirstOrderNegation(FirstOrderConstraint c)
c - The constraint to negate.public void consolidateVariables(AbstractMap m)
consolidateVariables in class Constraintm - The map in which to find unique copies of the variables.public void setQuantificationVariables(Vector o)
FirstOrderEquality children.setQuantificationVariables in class FirstOrderConstrainto - The new object references for the enclosing quantification variables, in order of
nesting.public Constraint[] getChildren()
getChildren in class Constraintpublic boolean evaluate()
evaluate in class Constraintpublic PropositionalConstraint propositionalize()
propositionalize in class FirstOrderConstraintpublic int hashCode()
FirstOrderNegation is the hash code of its child constraint
plus 1.public boolean equals(Object o)
FirstOrderNegations are equivalent when their constraints are equivalent.public void runVisit(Inference infer)
visit(·) method of the given Inference
for this Constraint, as per the visitor pattern.runVisit in class Constraintinfer - The inference visiting this constraint.Copyright © 2016. All rights reserved.