LBJ2.infer
Class Constraint

java.lang.Object
  extended by LBJ2.infer.Constraint
Direct Known Subclasses:
FirstOrderConstraint, PropositionalConstraint

public abstract class Constraint
extends java.lang.Object

A constraint is an expression that is either satisified or unsatisfied by its constituent classifier applications.


Constructor Summary
Constraint()
           
 
Method Summary
abstract  void consolidateVariables(java.util.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.
abstract  boolean evaluate()
          Determines whether the constraint is satisfied.
abstract  Constraint[] getChildren()
          Returns the children of this constraint in an array.
abstract  void runVisit(Inference infer)
          Calls the appropriate visit(·) method of the given Inference for this Constraint, as per the visitor pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraint

public Constraint()
Method Detail

evaluate

public abstract boolean evaluate()
Determines whether the constraint is satisfied.


consolidateVariables

public abstract void consolidateVariables(java.util.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.

Parameters:
m - The map in which to find unique copies of the variables.

getChildren

public abstract Constraint[] getChildren()
Returns the children of this constraint in an array.

Returns:
The children of this constraint in an array.

runVisit

public abstract void runVisit(Inference infer)
Calls the appropriate visit(·) method of the given Inference for this Constraint, as per the visitor pattern.

Parameters:
infer - The inference visiting this constraint.