choco.cp.solver.search.real
Class RealIncreasingDomain

java.lang.Object
  extended by choco.cp.solver.search.real.RealIncreasingDomain
All Implemented Interfaces:
ValIterator<RealVar>

public class RealIncreasingDomain
extends Object
implements ValIterator<RealVar>

An open-source Constraint Programming Kernel for Research and Education

Created by: Guillaume on 2 nov. 2004


Constructor Summary
RealIncreasingDomain()
           
 
Method Summary
 int getFirstVal(RealVar x)
          Accessing the index of the first branch for variable x
 int getNextVal(RealVar x, int i)
          generates the index of the next branch after branch i, on the alternative associated to variable x
 boolean hasNextVal(RealVar 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
 

Constructor Detail

RealIncreasingDomain

public RealIncreasingDomain()
Method Detail

hasNextVal

public boolean hasNextVal(RealVar 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<RealVar>
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

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

Specified by:
getFirstVal in interface ValIterator<RealVar>
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(RealVar 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<RealVar>
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


Copyright © 2012. All Rights Reserved.