Package org.jacop.search
Interface ConsistencyListener
- All Known Implementing Classes:
Calculator
,ConstantCalculator
,CreditCalculator
,FailConstraintsStatistics
,GeometricCalculator
,LinearCalculator
,LubyCalculator
,OneSolution
,SGMPCSCalculator
,Shaving
,TraceGenerator
public interface ConsistencyListener
Defines an interface of an object which can be plugined into the search right
after executing the consistency function (at the beginning of each search
node). Using children listeners it is possible to attach multiple number of
listeners working together in any fashion.
- Version:
- 4.9
-
Method Summary
Modifier and TypeMethodDescriptionboolean
executeAfterConsistency
(boolean consistent) It is executed right after consistency of the current search node.void
Setting one child listener.void
setChildrenListeners
(ConsistencyListener[] children) Each of the child listeners will be called and the return code from them will be combined (taken into account) by a parent).
-
Method Details
-
executeAfterConsistency
boolean executeAfterConsistency(boolean consistent) It is executed right after consistency of the current search node. Returning true when the parameter was false is not advised as things like invalid solutions can be found.- Parameters:
consistent
- specifies if the consistency call returned true or false.- Returns:
- true if the search should continue, false if the search should act as the consistency returned false.
-
setChildrenListeners
Each of the child listeners will be called and the return code from them will be combined (taken into account) by a parent).- Parameters:
children
- the children listeners attached to this listener.
-
setChildrenListeners
Setting one child listener.- Parameters:
child
- the only child listener added to this consistency listener.
-