omnics.strategy
Class SimpleForward

java.lang.Object
  extended by omnics.strategy.AbstractStrategy
      extended by omnics.strategy.SimpleForward
All Implemented Interfaces:
java.io.Serializable, ForwardStrategy, SolverStrategy

public class SimpleForward
extends AbstractStrategy
implements ForwardStrategy

A simple implementation of the ForwardStrategy - the variables are selected acording to their natural order.

The natural order of the variables (by their index) is usually the order in which they have been added to the problem.

Author:
Cristian Frasinaru
See Also:
Serialized Form

Field Summary
 
Fields inherited from class omnics.strategy.AbstractStrategy
solver
 
Constructor Summary
SimpleForward()
           
 
Method Summary
 Var next()
          Determines the next variable to be instantiated by the solver, which is the first element of the candidates set.
 
Methods inherited from class omnics.strategy.AbstractStrategy
getSolver, setSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface omnics.strategy.SolverStrategy
getSolver, setSolver
 

Constructor Detail

SimpleForward

public SimpleForward()
Method Detail

next

public Var next()
Determines the next variable to be instantiated by the solver, which is the first element of the candidates set.

Specified by:
next in interface ForwardStrategy
Returns:
the next variable to be instantiated by the solver or null if there are no more candidates.