choco.kernel.memory.trailing
Class StoredDouble
java.lang.Object
choco.kernel.memory.trailing.AbstractStoredObject
choco.kernel.memory.trailing.StoredDouble
- All Implemented Interfaces:
- IStateDouble
public final class StoredDouble
- extends AbstractStoredObject
- implements IStateDouble
A class implementing a backtrackable float variable.
Method Summary |
void |
_set(double y,
int wstamp)
Modifies the value without storing the former value on the trailing stack. |
double |
add(double delta)
modifying a StoredInt by an increment |
double |
get()
Returns the current value. |
void |
set(double y)
Modifies the value and stores if needed the former value on the
trailing stack. |
String |
toString()
|
myTrail
protected final StoredDoubleTrail myTrail
StoredDouble
public StoredDouble(EnvironmentTrailing env,
double d)
- Constructs a stored search with an initial value.
Note: this constructor should not be used directly: one should instead
use the IEnvironment factory
get
public double get()
- Description copied from interface:
IStateDouble
- Returns the current value.
- Specified by:
get
in interface IStateDouble
set
public void set(double y)
- Description copied from interface:
IStateDouble
- Modifies the value and stores if needed the former value on the
trailing stack.
- Specified by:
set
in interface IStateDouble
add
public double add(double delta)
- Description copied from interface:
IStateDouble
- modifying a StoredInt by an increment
- Specified by:
add
in interface IStateDouble
_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
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.