|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.trailing.trail.StoredDoubleTrail
public class StoredDoubleTrail
A backtrackable float variable trail storing past values of all the float variables.
Field Summary |
---|
Fields inherited from interface choco.kernel.memory.trailing.trail.ITrailStorage |
---|
LOGGER |
Constructor Summary | |
---|---|
StoredDoubleTrail(int nUpdates,
int nWorlds)
Constructs a trail with predefined size. |
Method Summary | |
---|---|
void |
clear()
|
int |
getSize()
Returns the current size of the stack. |
void |
resizeWorldCapacity(int newWorldCapacity)
Resizes the data structure to manage more values. |
void |
savePreviousState(StoredDouble v,
double oldValue,
int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp on the stacks. |
void |
worldCommit(int wi)
Commits a world: merging it with the previous one. |
void |
worldPop(int wi)
Moving down to the previous world. |
void |
worldPush(int wi)
Moving up to the next world. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StoredDoubleTrail(int nUpdates, int nWorlds)
nUpdates
- maximal number of updates that will be storednWorlds
- maximal number of worlds that will be storedMethod Detail |
---|
public void clear()
clear
in interface ITrailStorage
public void worldPush(int wi)
worldPush
in interface ITrailStorage
wi
- public void worldPop(int wi)
worldPop
in interface ITrailStorage
wi
- public int getSize()
getSize
in interface ITrailStorage
public void worldCommit(int wi)
worldCommit
in interface ITrailStorage
wi
- public void savePreviousState(StoredDouble v, double oldValue, int oldStamp)
v
- tha variable to store the valueoldValue
- the previous value to storeoldStamp
- the previous stamp value (to know when this old value
will be updated again when backtracking)public void resizeWorldCapacity(int newWorldCapacity)
resizeWorldCapacity
in interface ITrailStorage
newWorldCapacity
- the new capacity requested for world
management
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |