Class IntArrayRBT

  • Direct Known Subclasses:
    CompIntArrayRBT

    @Deprecated
    public class IntArrayRBT
    extends IntArrayRBTcommon
    Deprecated.
    Not used anymore. Will be removed in UIMA 4.
    A set (not a map) of ints. uses IntArrayRBTcommon Red-black tree implementation based on integer arrays. Preliminary performance measurements on j2se 1.4 indicate that the performance improvement as opposed to an object-based implementation are miniscule. This seems to indicate a much improved object creation handling in this vm.

    This tree implementation knows two modes of insertion: keys that are already in the tree can be rejected, or inserted as duplicates. Duplicate key insertion is randomized so that the tree's performance degrades gracefully in the presence of many identical keys.

    • Constructor Detail

      • IntArrayRBT

        public IntArrayRBT()
        Deprecated.
        Constructor for IntArrayRBT.
      • IntArrayRBT

        public IntArrayRBT​(int initialSize)
        Deprecated.
    • Method Detail

      • treeInsert

        protected int treeInsert​(int k)
        Deprecated.
        Parameters:
        k - the value to insert
        Returns:
        negative of the node number of the found key, if the key was found, else, the node number of the inserted new node
      • treeInsertWithDups

        protected int treeInsertWithDups​(int k)
        Deprecated.
      • treeInsert

        protected int treeInsert​(int k,
                                 boolean withDups)
        Deprecated.
      • insertKey

        public int insertKey​(int k)
        Deprecated.
      • add

        public int add​(int k)
        Deprecated.
      • addAdded

        public boolean addAdded​(int k)
        Deprecated.
        like add, but returns boolean flag true if not present before
        Parameters:
        k - -
        Returns:
        true if added (not present before)
      • insertKey

        private int insertKey​(int k,
                              boolean withDups)
        Deprecated.
      • insertKeyShowNegative

        public int insertKeyShowNegative​(int k)
        Deprecated.
      • commonInsertKey

        private int commonInsertKey​(int x)
        Deprecated.
        Code run after the insert operation, done to rebalance the red black tree
        Parameters:
        x - -
        Returns:
        -
      • deleteKey

        public boolean deleteKey​(int aKey)
        Deprecated.
      • clear

        public void clear()
        Deprecated.
      • debugScanFor

        public boolean debugScanFor​(int key)
        Deprecated.