javax.constraints.impl.search.selectors
Class VarSelectorMinDomain

java.lang.Object
  extended by javax.constraints.impl.search.selectors.AbstractVarSelector
      extended by javax.constraints.impl.search.selectors.VarSelectorMinDomain
All Implemented Interfaces:
VarSelector

public class VarSelectorMinDomain
extends AbstractVarSelector


Constructor Summary
VarSelectorMinDomain(SearchStrategy strategy)
          Constructor from SearchStrategy strategy
 
Method Summary
 VarSelectorType getType()
          Returns a type of this selector
 int select()
          Returns the index of the selected variable: "min size of domain, random tie break".
 
Methods inherited from class javax.constraints.impl.search.selectors.AbstractVarSelector
getSearchStrategy, getVars
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarSelectorMinDomain

public VarSelectorMinDomain(SearchStrategy strategy)
Constructor from SearchStrategy strategy

Method Detail

getType

public VarSelectorType getType()
Description copied from interface: VarSelector
Returns a type of this selector

Returns:
a type of this selector

select

public int select()
Returns the index of the selected variable: "min size of domain, random tie break". If no variables to select, it returns -1;

Specified by:
select in interface VarSelector
Specified by:
select in class AbstractVarSelector
Returns:
the index of the selected variable in the array of constrained variables upon which this selector was defined. Returns -1 if there are no variables to select.