Module org.chocosolver.solver
Class StoredIntTrail
- java.lang.Object
-
- org.chocosolver.memory.trailing.trail.flatten.StoredIntTrail
-
- All Implemented Interfaces:
IStorage
,IStoredIntTrail
public class StoredIntTrail extends Object implements IStoredIntTrail
-
-
Constructor Summary
Constructors Constructor Description StoredIntTrail(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 void
buildFakeHistory(StoredInt v, int initValue, int olderStamp)
void
savePreviousState(StoredInt v, int oldValue, int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp on the stacks.void
worldCommit(int worldIndex)
Comits a world: merging it with the previous one.void
worldPop(int worldIndex)
Moving down to the previous world.void
worldPush(int worldIndex)
Moving up to the next world.
-
-
-
Constructor Detail
-
StoredIntTrail
public StoredIntTrail(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:
worldCommit
in interfaceIStorage
-
savePreviousState
public void savePreviousState(StoredInt v, int oldValue, int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp on the stacks.- Specified by:
savePreviousState
in interfaceIStoredIntTrail
-
buildFakeHistory
public void buildFakeHistory(StoredInt v, int initValue, int olderStamp)
- Specified by:
buildFakeHistory
in interfaceIStoredIntTrail
-
-