Module org.chocosolver
Class Cyclic<V extends Variable>
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.variables.Cyclic<V>
-
- All Implemented Interfaces:
VariableSelector<V>
public class Cyclic<V extends Variable> extends Object implements VariableSelector<V>
A cyclic variable selector : Iterates over variables according to lexicographic ordering in a cyclic manner (loop back to the first variable)- Since:
- 18/07/12
- Author:
- Charles Prud'homme
-
-
Field Summary
Fields Modifier and Type Field Description protected int
current
-
Constructor Summary
Constructors Constructor Description Cyclic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
getVariable(V[] vars)
Provides access to the current selected variable amongvariables
.
-
-
-
Method Detail
-
getVariable
public V getVariable(V[] vars)
Description copied from interface:VariableSelector
Provides access to the current selected variable amongvariables
. If there is no variable left, returnnull
.- Specified by:
getVariable
in interfaceVariableSelector<V extends Variable>
- Returns:
- the current selected variable if any,
null
otherwise.
-
-