Class StoredDoubleTrail

    • Constructor Detail

      • StoredDoubleTrail

        public StoredDoubleTrail​(int nUpdates,
                                 int nWorlds,
                                 double loadfactor)
        Constructs a trail with predefined size.
        nUpdates - maximal number of updates that will be stored
        nWorlds - maximal number of worlds that will be stored
        loadfactor - load factor for structures
    • Method Detail

      • worldPush

        public void worldPush​(int worldIndex)
        Moving up to the next world.
        Specified by:
        worldPush in interface IStorage
        worldIndex - current world index
      • worldPop

        public void worldPop​(int worldIndex)
        Moving down to the previous world.
        Specified by:
        worldPop in interface IStorage
        worldIndex - current world index
      • worldCommit

        public void worldCommit​(int worldIndex)
        Comits a world: merging it with the previous one.
        Specified by:
        worldCommit in interface IStorage
      • savePreviousState

        public void savePreviousState​(StoredDouble v,
                                      double oldValue,
                                      int oldStamp)
        Reacts when a StoredInt is modified: push the former value & timestamp on the stacks.
        Specified by:
        savePreviousState in interface IStoredDoubleTrail