- java.lang.Object
-
- org.chocosolver.solver.search.loop.TimeStampedObject
-
- org.chocosolver.solver.variables.delta.OneValueDelta
-
- All Implemented Interfaces:
IDelta
,IEnumDelta
,IntDelta
public final class OneValueDelta extends TimeStampedObject implements IEnumDelta
- Since:
- 18 nov. 2010
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description OneValueDelta(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
-
OneValueDelta
public OneValueDelta(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)
Description copied from interface:IEnumDelta
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
-
-