|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ForwardStrategy
Describes an heuristic responsible with selecting the next variable to be instantiated by the solver.
The variable will be selected from the remaining candidates - variables that are active and have not been instantiated. If all the active variables have been instantiated that implies that the candidates set is empty and thenext method must
return null.
Example:
public class SimpleForward extends AbstractStrategy
implements ForwardStrategy {
public Var next() {
List<Var> candidates = solver.candidates();
if (candidates.size() == 0) {
return null;
}
return candidates.get(0);
}
| Method Summary | |
|---|---|
Var |
next()
Determines the next variable to be instantiated by the solver. |
| Methods inherited from interface omnics.strategy.SolverStrategy |
|---|
getSolver, setSolver |
| Method Detail |
|---|
Var next()
null.
null if there are no more candidates.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||