38 #ifndef COAL_INTERVAL_TREE_H
39 #define COAL_INTERVAL_TREE_H
118 unsigned int recursion_node_stack_size;
120 unsigned int current_parent;
121 unsigned int recursion_node_stack_top;
The node for interval tree.
Definition: interval_tree_node.h:51
Interval tree.
Definition: interval_tree.h:63
void leftRotate(IntervalTreeNode *node)
left rotation of tree node
SimpleInterval * deleteNode(IntervalTreeNode *node)
Delete one node of the interval tree.
void rightRotate(IntervalTreeNode *node)
right rotation of tree node
std::deque< SimpleInterval * > query(Scalar low, Scalar high)
Return result for a given query.
IntervalTreeNode * insert(SimpleInterval *new_interval)
Insert one node of the interval tree.
IntervalTreeNode * getPredecessor(IntervalTreeNode *node) const
get the predecessor of a given node
void recursiveInsert(IntervalTreeNode *node)
Inserts node into the tree as if it were a regular binary tree.
void fixupMaxHigh(IntervalTreeNode *node)
Travels up to the root fixing the max_high fields after an insertion or deletion.
IntervalTreeNode * getSuccessor(IntervalTreeNode *node) const
Get the successor of a given node.
IntervalTreeNode * root
Definition: interval_tree.h:91
void deleteFixup(IntervalTreeNode *node)
void deleteNode(SimpleInterval *ivl)
delete node stored a given interval
IntervalTreeNode * invalid_node
Definition: interval_tree.h:93
void recursivePrint(IntervalTreeNode *node) const
recursively print a subtree
IntervalTreeNode * recursiveSearch(IntervalTreeNode *node, SimpleInterval *ivl) const
recursively find the node corresponding to the interval
void print() const
Print the whole interval tree.
#define COAL_DLLAPI
Definition: config.hh:88
Main namespace.
Definition: broadphase_bruteforce.h:44
double Scalar
Definition: data_types.h:68
Interval trees implemented using red-black-trees as described in the book Introduction_To_Algorithms_...
Definition: simple_interval.h:49
Class describes the information needed when we take the right branch in searching for intervals but p...
Definition: interval_tree.h:53
IntervalTreeNode * start_node
Definition: interval_tree.h:55
unsigned int parent_index
Definition: interval_tree.h:57
bool try_right_branch
Definition: interval_tree.h:59