Class EnumDelta
- java.lang.Object
-
- org.chocosolver.solver.search.loop.TimeStampedObject
-
- org.chocosolver.solver.variables.delta.EnumDelta
-
- All Implemented Interfaces:
IDelta,IEnumDelta,IntDelta
public final class EnumDelta extends TimeStampedObject implements IEnumDelta
A class to store the removed value of an integer variable. It defines methods toadda value,clearthe structure and execute aProcedurefor each value stored.
-
-
Constructor Summary
Constructors Constructor Description EnumDelta(IEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int value, ICause cause)Adds a new value to the deltaintget(int idx)Return the idx^th value stored in the delta, if anyICausegetCause(int idx)Return the cause of the idx^th cause 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
-
EnumDelta
public EnumDelta(IEnvironment environment)
-
-
Method Detail
-
lazyClear
public void lazyClear()
Description copied from interface:IDeltaLazy clear the delta, on world change
-
add
public void add(int value, ICause cause)Adds a new value to the delta- Specified by:
addin interfaceIEnumDelta- Parameters:
value- value to addcause- of the removal
-
get
public int get(int idx)
Description copied from interface:IEnumDeltaReturn the idx^th value stored in the delta, if any- Specified by:
getin interfaceIEnumDelta- Parameters:
idx- rank of the value- Returns:
- idx^th value
-
getCause
public ICause getCause(int idx)
Description copied from interface:IntDeltaReturn the cause of the idx^th cause stored in the delta, if any
-
-