Class IStateIntVector

  • Direct Known Subclasses:
    StoredIntVector

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

      • MIN_CAPACITY

        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.
        Parameters:
        i - The search to add.
      • quickGet

        public int quickGet​(int index)
        access an element without any bound check
        Parameters:
        index - index of the element
        Returns:
        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
        Parameters:
        index - the index where the value is modified
        val - the new value
        Returns:
        the old value