omnics.filter
Class ArcConsistency
java.lang.Object
omnics.AbstractAlgorithm
omnics.filter.AbstractFilter
omnics.filter.ArcConsistency
- All Implemented Interfaces:
- java.io.Serializable, Algorithm, Filter
- Direct Known Subclasses:
- GeneralArcConsistency
public abstract class ArcConsistency
- extends AbstractFilter
Abstract class that offers support for creating global filters that maintain
the arc-consistency of the constraint network beeing solved.
- Author:
- Cristian Frasinaru
- See Also:
- Serialized Form
|
Method Summary |
void |
createConstraintsMatrix()
The constraint matrix has at row x.index and column y.index the
constraints that contain both x and y. |
boolean |
filter(Var current)
Performs an arc-consistency algorithm. |
protected boolean |
revise(Var x,
Var y)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
current
protected Var current
constraints
protected ConstraintSet[][] constraints
solution
protected Tuple solution
solver
protected SystematicSolver solver
optimum
protected int optimum
level
protected int level
explainer
protected Explainer explainer
firingEvents
protected boolean firingEvents
ArcConsistency
public ArcConsistency(Problem problem)
- Creates a new instance of ArcConsistency.
- Parameters:
problem - a constraint satisfaction problem
createConstraintsMatrix
public void createConstraintsMatrix()
- The constraint matrix has at row x.index and column y.index the
constraints that contain both x and y.
filter
public boolean filter(Var current)
- Performs an arc-consistency algorithm.
- Specified by:
filter in interface Filter- Specified by:
filter in class AbstractFilter
revise
protected boolean revise(Var x,
Var y)