Class IntervalDelta
- 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 toadda value,clearthe structure and execute aProcedurefor each value stored.
-
-
Constructor Summary
Constructors Constructor Description IntervalDelta(IEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int lb, int ub, ICause cause)Adds a new value interval to the deltaICausegetCause(int idx)Return the cause of the idx^th cause stored in the delta, if anyintgetLB(int idx)Return the lower bound of idx^th interval stored in the delta, if anyintgetUB(int idx)Return the upper bound idx^th interval stored in the delta, if anyvoidlazyClear()Lazy clear the delta, on world changeintsize()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:IDeltaLazy clear the delta, on world change
-
add
public void add(int lb, int ub, ICause cause)Description copied from interface:IIntervalDeltaAdds a new value interval to the delta- Specified by:
addin 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:IIntervalDeltaReturn the lower bound of idx^th interval stored in the delta, if any- Specified by:
getLBin interfaceIIntervalDelta- Parameters:
idx- rank of the interval- Returns:
- idx^th interval
-
getUB
public int getUB(int idx)
Description copied from interface:IIntervalDeltaReturn the upper bound idx^th interval stored in the delta, if any- Specified by:
getUBin interfaceIIntervalDelta- Parameters:
idx- rank of the interval- Returns:
- idx^th interval
-
getCause
public ICause getCause(int idx)
Description copied from interface:IntDeltaReturn the cause of the idx^th cause stored in the delta, if any
-
-