Module org.chocosolver
Class IntDomainRandom
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.values.IntDomainRandom
-
- All Implemented Interfaces:
IntValueSelector
public class IntDomainRandom extends Object implements IntValueSelector
Selects randomly a value in the variable domain. BEWARE: this should not be used within assignments and/or value removals if variables have a bounded domain.- Since:
- 2 juil. 2010
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description IntDomainRandom(long seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
selectValue(IntVar var)
Selects and returns the value to constrained chosen variable with.
-
-
-
Method Detail
-
selectValue
public int selectValue(IntVar var)
Selects and returns the value to constrained chosen variable with. The chosen value must belong to the domain ofvariable
.- Specified by:
selectValue
in interfaceIntValueSelector
- Returns:
- the value, based on the domain of variable
-
-