Class StoredBoolTrail
- java.lang.Object
-
- org.chocosolver.memory.trailing.trail.flatten.StoredBoolTrail
-
- All Implemented Interfaces:
IStorage,IStoredBoolTrail
public class StoredBoolTrail extends Object implements IStoredBoolTrail
-
-
Constructor Summary
Constructors Constructor Description StoredBoolTrail(int nUpdates, int nWorlds, double loadfactor)Constructs a trail with predefined size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildFakeHistory(StoredBool v, boolean initValue, int olderStamp)voidsavePreviousState(StoredBool v, boolean oldValue, int oldStamp)Reacts when a StoredInt is modified: push the former value & timestamp on the stacks.voidworldCommit(int worldIndex)Comits a world: merging it with the previous one.voidworldPop(int worldIndex)Moving down to the previous world.voidworldPush(int worldIndex)Moving up to the next world.
-
-
-
Constructor Detail
-
StoredBoolTrail
public StoredBoolTrail(int nUpdates, int nWorlds, double loadfactor)Constructs a trail with predefined size.- Parameters:
nUpdates- maximal number of updates that will be storednWorlds- maximal number of worlds that will be storedloadfactor- load factor for structures
-
-
Method Detail
-
worldPush
public void worldPush(int worldIndex)
Moving up to the next world.
-
worldPop
public void worldPop(int worldIndex)
Moving down to the previous world.
-
worldCommit
public void worldCommit(int worldIndex)
Comits a world: merging it with the previous one.- Specified by:
worldCommitin interfaceIStorage
-
savePreviousState
public void savePreviousState(StoredBool v, boolean oldValue, int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp on the stacks.- Specified by:
savePreviousStatein interfaceIStoredBoolTrail
-
buildFakeHistory
public void buildFakeHistory(StoredBool v, boolean initValue, int olderStamp)
- Specified by:
buildFakeHistoryin interfaceIStoredBoolTrail
-
-