|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.search.LDS<T>
T - type of variable being used in the search.public class LDS<T extends Var>
Defines functionality of limited discrepancy search. Plugin in this object to search to change your depth first search into limited discrepancy search.
| Constructor Summary | |
|---|---|
LDS(int maxDiscrepancies)
The search will not be allowed to deviate more than maxDiscrepancies times from the heuristic (e.g. |
|
| Method Summary | |
|---|---|
boolean |
leftChild(PrimitiveConstraint choice,
boolean status)
It is executed after exiting the left child. |
boolean |
leftChild(T var,
int value,
boolean status)
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)
Exiting the right children requires reduction of the current number of discrepancies being used. |
void |
setChildrenListeners(ExitChildListener<T> child)
It adds one child listener. |
void |
setChildrenListeners(ExitChildListener<T>[] children)
It sets the children listeners for the current listener. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LDS(int maxDiscrepancies)
maxDiscrepancies - maximal number of discrepancies allowed.| Method Detail |
|---|
public boolean leftChild(T var,
int value,
boolean status)
leftChild in interface ExitChildListener<T extends Var>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.
public boolean leftChild(PrimitiveConstraint choice,
boolean status)
leftChild in interface ExitChildListener<T extends Var>choice - primitive constraint used as the base of the choice point.status - true if the solution was found in the child subtree, false otherwise.
public void rightChild(T var,
int value,
boolean status)
rightChild in interface ExitChildListener<T extends Var>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
public void rightChild(PrimitiveConstraint choice,
boolean status)
ExitChildListener
rightChild in interface ExitChildListener<T extends Var>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 falsepublic void setChildrenListeners(ExitChildListener<T>[] children)
ExitChildListener
setChildrenListeners in interface ExitChildListener<T extends Var>children - array containing children listeners.public void setChildrenListeners(ExitChildListener<T> child)
ExitChildListener
setChildrenListeners in interface ExitChildListener<T extends Var>child - added child listener.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||