choco.integer.search
Interface IValIterator

All Known Implementing Classes:
DecreasingDomain, IncreasingDomain, RealIncreasingDomain

public interface IValIterator

An interface for control objects that model the iteration of (search) values associated to an IntDomainVarImpl


Method Summary
 int getFirstVal(Var x)
          Accessing the index of the first branch for variable x
 int getNextVal(Var x, int i)
          generates the index of the next branch after branch i, on the alternative associated to variable x
 boolean hasNextVal(Var x, int i)
          testing whether more branches can be considered after branch i, on the alternative associated to variable x
 

Method Detail

hasNextVal

boolean hasNextVal(Var x,
                   int i)
testing whether more branches can be considered after branch i, on the alternative associated to variable x

Parameters:
x - the variable under scrutiny
i - the index of the last branch explored
Returns:
true if more branches can be expanded after branch i

getFirstVal

int getFirstVal(Var x)
Accessing the index of the first branch for variable x

Parameters:
x - the variable under scrutiny
Returns:
the index of the first branch (such as the first value to be assigned to the variable)

getNextVal

int getNextVal(Var x,
               int i)
generates the index of the next branch after branch i, on the alternative associated to variable x

Parameters:
x - the variable under scrutiny
i - the index of the last branch explored
Returns:
the index of the next branch to be expanded after branch i