javax.constraints.impl.search.selectors
Class VarSelectorMinDomainMinValue

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

public class VarSelectorMinDomainMinValue
extends AbstractVarSelector


Constructor Summary
VarSelectorMinDomainMinValue(SearchStrategy strategy)
           
 
Method Summary
 VarSelectorType getType()
          Returns a type of this selector
 int select()
          Selects the unbound variable with the smallest domain.
 
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

VarSelectorMinDomainMinValue

public VarSelectorMinDomainMinValue(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()
Selects the unbound variable with the smallest domain. If there are two variables with the same smallest size, a variable with the smallest minimum is selected. 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.