|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.mem.StoredFloatTrail
public class StoredFloatTrail
A backtrackable float variable trail storing past values of all the float variables.
Constructor Summary | |
---|---|
StoredFloatTrail(Environment env,
int nUpdates,
int nWorlds)
Constructs a trail with predefined size. |
Method Summary | |
---|---|
int |
getSize()
Returns the current size of the stack. |
void |
resizeWorldCapacity(int newWorldCapacity)
Resizes the data structure to manage more values. |
void |
savePreviousState(StoredFloat v,
double oldValue,
int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp on the stacks. |
void |
worldCommit()
Commits a world: merging it with the previous one. |
void |
worldPop()
Moving down to the previous world. |
void |
worldPush()
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 StoredFloatTrail(Environment env, int nUpdates, int nWorlds)
env
- the environment responsible of managing worldsnUpdates
- maximal number of updates that will be storednWorlds
- maximal number of worlds that will be storedMethod Detail |
---|
public void worldPush()
worldPush
in interface ITrailStorage
public void worldPop()
worldPop
in interface ITrailStorage
public int getSize()
getSize
in interface ITrailStorage
public void worldCommit()
worldCommit
in interface ITrailStorage
public void savePreviousState(StoredFloat 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 |