- 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 toadd
a value,clear
the structure and execute aProcedure
for each value stored.
-
-
Constructor Summary
Constructors Constructor Description EnumDelta(IEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int value, ICause cause)
Adds a new value to the deltaint
get(int idx)
Return the idx^th value stored in the delta, if anyICause
getCause(int idx)
Return the cause of the idx^th cause 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
-
EnumDelta
public EnumDelta(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 value, ICause cause)
Adds a new value to the delta- Specified by:
add
in interfaceIEnumDelta
- Parameters:
value
- value to addcause
- of the removal
-
get
public int get(int idx)
Description copied from interface:IEnumDelta
Return the idx^th value stored in the delta, if any- Specified by:
get
in interfaceIEnumDelta
- Parameters:
idx
- rank of the value- Returns:
- idx^th value
-
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
-
-