Class IStateIntVector

  • Direct Known Subclasses:

    public abstract class IStateIntVector
    extends Object
    Describes an search vector with states (describing some history of the data structure).
    • Field Detail


        public static final int MIN_CAPACITY
        Minimal capacity of a vector
        See Also:
        Constant Field Values
      • elementData

        protected int[] elementData
        Contains the elements of the vector.
      • size

        protected IStateInt size
        A backtrackable search with the size of the vector.
      • environment

        protected final IEnvironment environment
        The current environment.
    • Constructor Detail

      • IStateIntVector

        public IStateIntVector​(IEnvironment env,
                               int initialSize,
                               int initialValue)
      • IStateIntVector

        public IStateIntVector​(IEnvironment env,
                               int[] entries)
    • Method Detail

      • rangeCheck

        protected boolean rangeCheck​(int index)
      • add

        public abstract void add​(int i)
        Adds a new search at the end of the vector.
        i - The search to add.
      • quickGet

        public int quickGet​(int index)
        access an element without any bound check
        index - index of the element
        the value
      • set

        public abstract int set​(int index,
                                int val)
        Assigns a new value val to the element index and returns the old value
      • quickSet

        public abstract int quickSet​(int index,
                                     int val)
        Assigns a new value val to the element indexth and return the old value without bound check
        index - the index where the value is modified
        val - the new value
        the old value