javax.constraints
Interface VarSelector

All Known Implementing Classes:
AbstractVarSelector, VarSelectorInputOrder, VarSelectorMinDomain, VarSelectorMinDomainMinValue, VarSelectorRandom

public interface VarSelector

This is a common interface for selection of a constrained variable from an array of variables. Used inside search strategies.


Method Summary
 SearchStrategy getSearchStrategy()
          Return a search strategy with which this selector is associated
 VarSelectorType getType()
          Returns a type of this selector
 Var[] getVars()
          Returns the array of constrained variables upon which this selector was defined.
 int select()
          Returns the index of the selected variable in the array of constrained variables upon which this selector was defined.
 

Method Detail

getSearchStrategy

SearchStrategy getSearchStrategy()
Return a search strategy with which this selector is associated

Returns:
a search strategy with which this selector is associated

getType

VarSelectorType getType()
Returns a type of this selector

Returns:
a type of this selector

getVars

Var[] getVars()
Returns the array of constrained variables upon which this selector was defined.

Returns:
the array of constrained variables upon which this selector was defined.

select

int select()
Returns the index of the selected variable in the array of constrained variables upon which this selector was defined. If no variables to select, it returns -1;

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.