- java.lang.Object
-
- org.chocosolver.memory.IStateDouble
-
- Direct Known Subclasses:
StoredDouble
public abstract class IStateDouble extends Object
An abstract class for backtrackable double.- Since:
- 29/04/13
- Author:
- Charles Prud'homme
-
-
Field Summary
Fields Modifier and Type Field Description protected double
currentValue
protected IEnvironment
environment
protected int
timeStamp
-
Constructor Summary
Constructors Constructor Description IStateDouble(IEnvironment env, double i)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
_set(double y, int wstamp)
Modifies the value without storing the former value on the trailing stack.double
get()
Returns the current value.void
overrideTimeStamp(int aTimeStamp)
abstract void
set(double y)
Modifies the value and stores if needed the former value on the trailing stack.String
toString()
-
-
-
Field Detail
-
environment
protected final IEnvironment environment
-
currentValue
protected double currentValue
-
timeStamp
protected int timeStamp
-
-
Constructor Detail
-
IStateDouble
public IStateDouble(IEnvironment env, double i)
-
-
Method Detail
-
get
public final double get()
Returns the current value.
-
set
public abstract void set(double y)
Modifies the value and stores if needed the former value on the trailing stack.
-
_set
public void _set(double y, int wstamp)
Modifies the value without storing the former value on the trailing stack.- Parameters:
y
- the new valuewstamp
- the stamp of the world in which the update is performed
-
overrideTimeStamp
public void overrideTimeStamp(int aTimeStamp)
-
-