choco.cp.solver.search.integer.valiterator
Class DecreasingDomain
java.lang.Object
choco.cp.solver.search.integer.valiterator.DecreasingDomain
- All Implemented Interfaces:
- ValIterator<IntDomainVar>
public class DecreasingDomain
- extends Object
- implements ValIterator<IntDomainVar>
Method Summary |
int |
getFirstVal(IntDomainVar x)
Accessing the index of the first branch for variable x |
int |
getNextVal(IntDomainVar x,
int i)
generates the index of the next branch after branch i, on the alternative associated to variable x |
boolean |
hasNextVal(IntDomainVar x,
int i)
testing whether more branches can be considered after branch i, on the alternative associated to variable x |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DecreasingDomain
public DecreasingDomain()
hasNextVal
public boolean hasNextVal(IntDomainVar x,
int i)
- testing whether more branches can be considered after branch i, on the alternative associated to variable x
- Specified by:
hasNextVal
in interface ValIterator<IntDomainVar>
- Parameters:
x
- the variable under scrutinyi
- the index of the last branch explored
- Returns:
- true if more branches can be expanded after branch i
getFirstVal
public int getFirstVal(IntDomainVar x)
- Accessing the index of the first branch for variable x
- Specified by:
getFirstVal
in interface ValIterator<IntDomainVar>
- 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
public int getNextVal(IntDomainVar x,
int i)
- generates the index of the next branch after branch i, on the alternative associated to variable x
- Specified by:
getNextVal
in interface ValIterator<IntDomainVar>
- Parameters:
x
- the variable under scrutinyi
- the index of the last branch explored
- Returns:
- the index of the next branch to be expanded after branch i
Copyright © 2012. All Rights Reserved.