omnics.strategy
Interface BackwardStrategy

All Superinterfaces:
SolverStrategy
All Known Implementing Classes:
BackJumping, SimpleBackward

public interface BackwardStrategy
extends SolverStrategy

Describes an heuristic responsible with selecting the variable to which the systematic search algorithm will return in case of failure.

The variable will be selected from the variables previously instantiated by the solver, which are stored in a stack accesible via the solver's path() method.

Example:

 
 public class SimpleBackward extends AbstractStrategy 
     implements BackwardStrategy {
   
   public Var back() {
       return solver.path().peek();        
   }
 }

Author:
Cristian Frasinaru

Method Summary
 Var back()
          Determines the variable to which the systematic search algorithm will return in case of failure.
 
Methods inherited from interface omnics.strategy.SolverStrategy
getSolver, setSolver
 

Method Detail

back

Var back()
Determines the variable to which the systematic search algorithm will return in case of failure.

Returns:
the variable to return to in case of failure or null if no return is possible