#include <interval_tree.h>
Public Member Functions | |
SimpleInterval< S > * | deleteNode (IntervalTreeNode< S > *node) |
Delete one node of the interval tree. More... | |
void | deleteNode (SimpleInterval< S > *ivl) |
delete node stored a given interval More... | |
IntervalTreeNode< S > * | getPredecessor (IntervalTreeNode< S > *node) const |
get the predecessor of a given node More... | |
IntervalTreeNode< S > * | getSuccessor (IntervalTreeNode< S > *node) const |
Get the successor of a given node. More... | |
IntervalTreeNode< S > * | insert (SimpleInterval< S > *new_interval) |
Insert one node of the interval tree. More... | |
IntervalTree () | |
void | print () const |
Print the whole interval tree. More... | |
std::deque< SimpleInterval< S > * > | query (S low, S high) |
Return result for a given query. More... | |
~IntervalTree () | |
Protected Member Functions | |
void | deleteFixup (IntervalTreeNode< S > *node) |
void | fixupMaxHigh (IntervalTreeNode< S > *node) |
Travels up to the root fixing the max_high fields after an insertion or deletion. More... | |
void | leftRotate (IntervalTreeNode< S > *node) |
left rotation of tree node More... | |
void | recursiveInsert (IntervalTreeNode< S > *node) |
Inserts node into the tree as if it were a regular binary tree. More... | |
void | recursivePrint (IntervalTreeNode< S > *node) const |
recursively print a subtree More... | |
IntervalTreeNode< S > * | recursiveSearch (IntervalTreeNode< S > *node, SimpleInterval< S > *ivl) const |
recursively find the node corresponding to the interval More... | |
void | rightRotate (IntervalTreeNode< S > *node) |
right rotation of tree node More... | |
Protected Attributes | |
IntervalTreeNode< S > * | nil |
IntervalTreeNode< S > * | root |
Private Attributes | |
unsigned int | current_parent |
it_recursion_node< S > * | recursion_node_stack |
unsigned int | recursion_node_stack_size |
unsigned int | recursion_node_stack_top |
Interval tree.
Definition at line 72 of file interval_tree.h.
fcl::detail::IntervalTree< S >::IntervalTree |
the following are used for the query function
Definition at line 54 of file interval_tree-inl.h.
fcl::detail::IntervalTree< S >::~IntervalTree |
Definition at line 77 of file interval_tree-inl.h.
|
protected |
Definition at line 335 of file interval_tree-inl.h.
SimpleInterval< S > * fcl::detail::IntervalTree< S >::deleteNode | ( | IntervalTreeNode< S > * | node | ) |
Delete one node of the interval tree.
y should not be nil in this case y is the node to splice out and x is its child
Definition at line 437 of file interval_tree-inl.h.
void fcl::detail::IntervalTree< S >::deleteNode | ( | SimpleInterval< S > * | ivl | ) |
delete node stored a given interval
Definition at line 410 of file interval_tree-inl.h.
|
protected |
Travels up to the root fixing the max_high fields after an insertion or deletion.
Definition at line 190 of file interval_tree-inl.h.
IntervalTreeNode< S > * fcl::detail::IntervalTree< S >::getPredecessor | ( | IntervalTreeNode< S > * | node | ) | const |
get the predecessor of a given node
Definition at line 291 of file interval_tree-inl.h.
IntervalTreeNode< S > * fcl::detail::IntervalTree< S >::getSuccessor | ( | IntervalTreeNode< S > * | node | ) | const |
Get the successor of a given node.
Definition at line 266 of file interval_tree-inl.h.
IntervalTreeNode< S > * fcl::detail::IntervalTree< S >::insert | ( | SimpleInterval< S > * | new_interval | ) |
Insert one node of the interval tree.
use sentinel instead of checking for root
Definition at line 201 of file interval_tree-inl.h.
|
protected |
left rotation of tree node
Definition at line 116 of file interval_tree-inl.h.
void fcl::detail::IntervalTree< S >::print |
Print the whole interval tree.
Definition at line 328 of file interval_tree-inl.h.
std::deque< SimpleInterval< S > * > fcl::detail::IntervalTree< S >::query | ( | S | low, |
S | high | ||
) |
Return result for a given query.
Definition at line 512 of file interval_tree-inl.h.
|
protected |
Inserts node into the tree as if it were a regular binary tree.
Definition at line 165 of file interval_tree-inl.h.
|
protected |
recursively print a subtree
Definition at line 316 of file interval_tree-inl.h.
|
protected |
recursively find the node corresponding to the interval
Definition at line 419 of file interval_tree-inl.h.
|
protected |
right rotation of tree node
Definition at line 141 of file interval_tree-inl.h.
|
private |
Definition at line 130 of file interval_tree.h.
|
protected |
Definition at line 105 of file interval_tree.h.
|
private |
Definition at line 129 of file interval_tree.h.
|
private |
Definition at line 128 of file interval_tree.h.
|
private |
Definition at line 131 of file interval_tree.h.
|
protected |
Definition at line 103 of file interval_tree.h.