Class OneValueDelta
- 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 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
-
OneValueDelta
public OneValueDelta(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)Description copied from interface:IEnumDeltaAdds 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
-
-