Package org.jacop.search
Interface ExitChildListener<T extends Var>
- Type Parameters:
T
- type of variable used in the search.
- All Known Implementing Classes:
CreditCalculator
,LDS
,NoGoodsCollector
,Shaving
,TraceGenerator
public interface ExitChildListener<T extends Var>
Defines a listener which is called by the search if a child node is exited.
It works for both the right and left child.
- Version:
- 4.8
-
Method Summary
Modifier and TypeMethodDescriptionboolean
leftChild
(PrimitiveConstraint choice, boolean status) It is executed after exiting the left child.boolean
It is executed after exiting the left child.void
rightChild
(PrimitiveConstraint choice, boolean status) It is executed after exiting the right child.void
rightChild
(T var, int value, boolean status) It is executed after exiting the right child.void
setChildrenListeners
(ExitChildListener<T> child) It adds one child listener.void
setChildrenListeners
(ExitChildListener<T>[] children) It sets the children listeners for the current listener.
-
Method Details
-
leftChild
It is executed after exiting the left child.- Parameters:
var
- variable used in the choice point.value
- value used in the choice point.status
- true if the solution was found in the child subtree, false otherwise.- Returns:
- true if the search should continue undisturbed, false if it should exit the current node with false
-
leftChild
It is executed after exiting the left child.- Parameters:
choice
- primitive constraint used as the base of the choice point.status
- true if the solution was found in the child subtree, false otherwise.- Returns:
- true if the search should continue undisturbed to the right node, false if it should exit the current node with false
-
rightChild
It is executed after exiting the right child.- Parameters:
var
- variable used in the choice point.value
- value used in the choice point.status
- true if the solution was found in the child subtree, false otherwise. exit the current node with false
-
rightChild
It is executed after exiting the right child.- Parameters:
choice
- primitive constraint used as the base of the choice point.status
- true if the solution was found in the child subtree, false otherwise. exit the current node with false
-
setChildrenListeners
It sets the children listeners for the current listener.- Parameters:
children
- array containing children listeners.
-
setChildrenListeners
It adds one child listener.- Parameters:
child
- added child listener.
-