Class IntArrayRBT
java.lang.Object
org.apache.uima.internal.util.rb_trees.IntArrayRBTcommon
org.apache.uima.internal.util.rb_trees.IntArrayRBT
- Direct Known Subclasses:
CompIntArrayRBT
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.
- To be removed in version:
- 4.0.0
-
Field Summary
Fields inherited from class org.apache.uima.internal.util.rb_trees.IntArrayRBTcommon
black, color, default_size, greatestNode, growth_factor, initialSize, klrp, klrp1, klrp2, klrp3, MAXklrp0, MAXklrpMask, multiplication_limit, next, NIL, red, root, size
-
Constructor Summary
ConstructorDescriptionDeprecated.Constructor for IntArrayRBT.IntArrayRBT
(int initialSize) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionint
add
(int k) Deprecated.boolean
addAdded
(int k) Deprecated.like add, but returns boolean flag true if not present beforevoid
clear()
Deprecated.boolean
debugScanFor
(int key) Deprecated.boolean
deleteKey
(int aKey) Deprecated.int
getKeyForNode
(int node) Deprecated.int
insertKey
(int k) Deprecated.int
insertKeyShowNegative
(int k) Deprecated.iterator()
Deprecated.protected int
treeInsert
(int k) Deprecated.protected int
treeInsert
(int k, boolean withDups) Deprecated.protected int
treeInsertWithDups
(int k) Deprecated.Methods inherited from class org.apache.uima.internal.util.rb_trees.IntArrayRBTcommon
compare, contains, containsKey, deleteFixup, deleteNode, ensureArrayCapacity, ensureCapacityKlrp, findInsertionPoint, findInsertionPointCmn, findInsertionPointNoDups, findKey, findKeyDown, flush, getFirstNode, getLeft, getParent, getRight, getXXX, initVars, leftRotate, maxDepth, maxDepth, minDepth, minDepth, newNode, nextNode, nextPowerOf2, nodeDepth, nodeDepth, previousNode, printKeys, printKeys, rightRotate, satisfiesRBProps, satisfiesRedBlackProperties, setAsRoot, setLeft, setParent, setRight, setupArrays, setXXX, size
-
Constructor Details
-
IntArrayRBT
public IntArrayRBT()Deprecated.Constructor for IntArrayRBT. -
IntArrayRBT
public IntArrayRBT(int initialSize) Deprecated.
-
-
Method Details
-
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)
-
insertKeyShowNegative
public int insertKeyShowNegative(int k) Deprecated. -
deleteKey
public boolean deleteKey(int aKey) Deprecated. -
clear
public void clear()Deprecated. -
iterator
Deprecated. -
debugScanFor
public boolean debugScanFor(int key) Deprecated. -
getKeyForNode
public int getKeyForNode(int node) Deprecated.- Overrides:
getKeyForNode
in classIntArrayRBTcommon
-