|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Interval tree using nodes without virtual destructor. More...
#include <tpl_interval_tree.H>
Public Types | |
| using | Base = Gen_Interval_Tree< Interval_Tree_Node, T, Compare > |
Public Types inherited from Aleph::Gen_Interval_Tree< NodeType, T, Compare > | |
| using | Key = Interval< T > |
| using | IntervalCmp = Interval_Less< T, Compare > |
| using | Node = NodeType< Key > |
Additional Inherited Members | |
Public Member Functions inherited from Aleph::Gen_Interval_Tree< NodeType, T, Compare > | |
| void | set_seed (const unsigned long seed) noexcept |
| Set the random number generator seed. | |
| IntervalCmp | key_comp () const noexcept |
| Return the interval comparison functor (over Interval<T> keys) | |
| const Compare & | endpoint_comp () const noexcept |
| Return the endpoint comparison functor (const) | |
| const Compare & | get_compare () const noexcept |
| Backwards-compatible accessor for the endpoint comparator. | |
| void | swap (Gen_Interval_Tree &tree) noexcept(noexcept(std::swap(tree_root, tree.tree_root)) and noexcept(std::swap(cmp, tree.cmp)) and noexcept(std::swap(r, tree.r)) and noexcept(std::swap(num_nodes, tree.num_nodes))) |
Swap all state with tree in O(1) | |
| Gen_Interval_Tree (const unsigned long seed, const Compare &_cmp=Compare()) | |
| Construct with explicit seed and comparator. | |
| Gen_Interval_Tree (const Compare &_cmp=Compare()) | |
| Construct with default seed (from system time). | |
| Gen_Interval_Tree (const Gen_Interval_Tree &)=delete | |
| Deleted copy constructor. | |
| Gen_Interval_Tree & | operator= (const Gen_Interval_Tree &)=delete |
| Deleted copy assignment. | |
| Gen_Interval_Tree (Gen_Interval_Tree &&)=delete | |
| Deleted move constructor. | |
| Gen_Interval_Tree & | operator= (Gen_Interval_Tree &&)=delete |
| Deleted move assignment. | |
| ~Gen_Interval_Tree () | |
| gsl_rng * | gsl_rng_object () const noexcept |
| Get a pointer to the GSL random number generator. | |
| Node *& | getRoot () noexcept |
| Return the tree's root. | |
| const Node * | getRoot () const |
| Return the tree's root (const) | |
| size_t | size () const noexcept |
| Return the number of nodes. | |
| bool | is_empty () const noexcept |
| Return true if the tree is empty. | |
| void | reset_num_nodes () noexcept |
| Reset the node count (used after manual tree destruction) | |
| const Node * | search (const Key &key) const |
| Search for an exact interval in the tree. | |
| Node * | insert (Node *p) |
| Insert a node (no duplicates). | |
| Node * | insert_dup (Node *p) |
| Insert a node (duplicates allowed). | |
| Node * | remove (const Key &key) |
| Remove an interval from the tree. | |
| const Node * | overlap_search (const Key &query) const |
Find any interval that overlaps with query (CLRS algorithm). | |
| template<class Op > | |
| void | all_overlaps (const Key &query, Op &&op) const |
Apply op to every interval overlapping query. | |
| DynList< Key > | find_all_overlaps (const Key &query) const |
Find all intervals overlapping query. | |
| template<class Op > | |
| void | stab (const T &p, Op &&op) const |
Apply op to every interval containing point p. | |
| DynList< Key > | find_stab (const T &p) const |
Find all intervals containing point p. | |
| bool | verify () const |
| Verify BST, heap, and max_endpoint invariants. | |
Interval tree using nodes without virtual destructor.
| T | Endpoint type. |
| Compare | Comparison functor for endpoints. |
Definition at line 980 of file tpl_interval_tree.H.
| using Aleph::Interval_Tree< T, Compare >::Base = Gen_Interval_Tree<Interval_Tree_Node, T, Compare> |
Definition at line 983 of file tpl_interval_tree.H.