- java.lang.Object
-
- org.chocosolver.solver.search.loop.TimeStampedObject
-
- org.chocosolver.solver.variables.delta.IntervalDelta
-
- All Implemented Interfaces:
IDelta
,IIntervalDelta
,IntDelta
public final class IntervalDelta extends TimeStampedObject implements IIntervalDelta
A class to store the removed intervals of an integer variable. It defines methods toadd
a value,clear
the structure and execute aProcedure
for each value stored.
-
-
Constructor Summary
Constructors Constructor Description IntervalDelta(IEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int lb, int ub, ICause cause)
Adds a new value interval to the deltaICause
getCause(int idx)
Return the cause of the idx^th cause stored in the delta, if anyint
getLB(int idx)
Return the lower bound of idx^th interval stored in the delta, if anyint
getUB(int idx)
Return the upper bound idx^th interval stored in the delta, if anyvoid
lazyClear()
Lazy clear the delta, on world changeint
size()
Returns the number of element-
Methods inherited from class org.chocosolver.solver.search.loop.TimeStampedObject
getEnvironment, getTimeStamp, needReset, resetStamp
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.chocosolver.solver.variables.delta.IDelta
getEnvironment
-
-
-
-
Constructor Detail
-
IntervalDelta
public IntervalDelta(IEnvironment environment)
-
-
Method Detail
-
lazyClear
public void lazyClear()
Description copied from interface:IDelta
Lazy clear the delta, on world change
-
add
public void add(int lb, int ub, ICause cause)
Description copied from interface:IIntervalDelta
Adds a new value interval to the delta- Specified by:
add
in interfaceIIntervalDelta
- Parameters:
lb
- lower bound of removed intervalub
- upper bound of removed intervalcause
- of the removal
-
getLB
public int getLB(int idx)
Description copied from interface:IIntervalDelta
Return the lower bound of idx^th interval stored in the delta, if any- Specified by:
getLB
in interfaceIIntervalDelta
- Parameters:
idx
- rank of the interval- Returns:
- idx^th interval
-
getUB
public int getUB(int idx)
Description copied from interface:IIntervalDelta
Return the upper bound idx^th interval stored in the delta, if any- Specified by:
getUB
in interfaceIIntervalDelta
- Parameters:
idx
- rank of the interval- Returns:
- idx^th interval
-
getCause
public ICause getCause(int idx)
Description copied from interface:IntDelta
Return the cause of the idx^th cause stored in the delta, if any
-
-