Class AbstractEnvironment

    • Field Detail

      • currentWorld

        protected int currentWorld
      • timestamp

        protected int timestamp
    • Constructor Detail

      • AbstractEnvironment

        protected AbstractEnvironment()
    • Method Detail

      • getWorldIndex

        public final int getWorldIndex()
        Description copied from interface: IEnvironment
        Returns the world number.
        Specified by:
        getWorldIndex in interface IEnvironment
        current world index
      • getTimeStamp

        public final int getTimeStamp()
        Description copied from interface: IEnvironment
        Return the current time stamp. It differs from world index since it never decrements.
        Specified by:
        getTimeStamp in interface IEnvironment
        the timestamp
      • makeBitSet

        public IStateBitSet makeBitSet​(int size)
        Factory pattern: new IStateBitSet objects are created by the environment
        Specified by:
        makeBitSet in interface IEnvironment
        size - initial size of the IStateBitSet
      • worldPopUntil

        public void worldPopUntil​(int w)
        Backtracks to the w previous choice point in the tree search
        Specified by:
        worldPopUntil in interface IEnvironment
        w - world index to pop to
      • fakeHistoryNeeded

        public boolean fakeHistoryNeeded()
        Specified by:
        fakeHistoryNeeded in interface IEnvironment
        true if building fake history is needed (the condition is satisfied).
      • buildFakeHistoryOn

        public void buildFakeHistoryOn​(ICondition condition)
        Description copied from interface: IEnvironment
        Force to build fake history when a stored object on a particular condition. The default condition is ICondition.FALSE.
        Specified by:
        buildFakeHistoryOn in interface IEnvironment
        condition - to satisfy to build fake history