Class GeneralizedMinDomVarSelector
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.variables.GeneralizedMinDomVarSelector
-
- All Implemented Interfaces:
VariableSelector
public class GeneralizedMinDomVarSelector extends Object implements VariableSelector
First fail variable selector generalized to all variables. It chooses the variable with the smallest domain (instantiated variables are ignored).- Author:
- Jean-Guillaume Fages
-
-
Constructor Summary
Constructors Constructor Description GeneralizedMinDomVarSelector()Chooses the non-instantiated variable with the smallest domain First fail generalization to all variable kinds.GeneralizedMinDomVarSelector(boolean leastFree)Chooses the non-instantiated variable with the smallest domain First fail generalization to all variable kinds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VariablegetVariable(Variable[] variables)Provides access to the current selected variable amongvariables.
-
-
-
Constructor Detail
-
GeneralizedMinDomVarSelector
public GeneralizedMinDomVarSelector()
Chooses the non-instantiated variable with the smallest domain First fail generalization to all variable kinds.
-
GeneralizedMinDomVarSelector
public GeneralizedMinDomVarSelector(boolean leastFree)
Chooses the non-instantiated variable with the smallest domain First fail generalization to all variable kinds.- Parameters:
leastFree- chooses the most Free variable if set to false
-
-
Method Detail
-
getVariable
public Variable getVariable(Variable[] variables)
Description copied from interface:VariableSelectorProvides access to the current selected variable amongvariables. If there is no variable left, returnnull.- Specified by:
getVariablein interfaceVariableSelector- Returns:
- the current selected variable if any,
nullotherwise.
-
-