#include <genesis/utils/containers/interval_tree/fwd.hpp>
Node in an IntervalTree.
The implementation is based on interval-tree, which is published under the CC0-1.0 License (Creative Commons Zero v1.0 Universal); see our Acknowledgements for further details, and see Interval, IntervalTreeIterator, and IntervalTree for the other classes based on the original code.
Public Member Functions | |
IntervalTreeNode (IntervalTreeNode &&)=default | |
IntervalTreeNode (IntervalTreeNode *parent, interval_type &&interval) | |
IntervalTreeNode (IntervalTreeNode *parent, interval_type const &interval) | |
IntervalTreeNode (IntervalTreeNode const &)=default | |
~IntervalTreeNode ()=default | |
RedBackColor | color () const |
size_t | height () const |
Return the height of the node in the tree. More... | |
numerical_type | high () const |
Return the upper bound of the interval of this node. More... | |
interval_type const & | interval () const |
bool | is_left () const noexcept |
bool | is_right () const noexcept |
bool | is_root () const noexcept |
IntervalTreeNode const * | left () const |
numerical_type | low () const |
Return the lower bound of the interval of this node. More... | |
numerical_type | max () const |
IntervalTreeNode & | operator= (IntervalTreeNode &&)=default |
IntervalTreeNode & | operator= (IntervalTreeNode const &)=default |
IntervalTreeNode const * | parent () const |
IntervalTreeNode const * | right () const |
Public Types | |
using | data_type = DataType |
using | interval_kind = IntervalKind |
using | interval_type = Interval< DataType, NumericalType, IntervalKind > |
using | node_type = IntervalTreeNode< DataType, NumericalType, IntervalKind > |
using | numerical_type = NumericalType |
using | self_type = node_type |
using | tree_type = IntervalTree< DataType, NumericalType, IntervalKind > |
Public Attributes | |
friend | IntervalTree< DataType, NumericalType, IntervalKind > |
friend | IntervalTreeIterator< node_type, false > |
friend | IntervalTreeIterator< node_type, true > |
|
inline |
Definition at line 121 of file utils/containers/interval_tree/node.hpp.
|
inline |
Definition at line 125 of file utils/containers/interval_tree/node.hpp.
|
default |
|
default |
|
default |
|
inline |
Return the color of the node.
Definition at line 174 of file utils/containers/interval_tree/node.hpp.
|
inline |
Return the height of the node in the tree.
This is computed as height = how many parents does it have. The root has no parents and is therefor has height 0.
Definition at line 209 of file utils/containers/interval_tree/node.hpp.
|
inline |
Return the upper bound of the interval of this node.
Definition at line 229 of file utils/containers/interval_tree/node.hpp.
|
inline |
Definition at line 146 of file utils/containers/interval_tree/node.hpp.
|
inlinenoexcept |
Definition at line 156 of file utils/containers/interval_tree/node.hpp.
|
inlinenoexcept |
Definition at line 161 of file utils/containers/interval_tree/node.hpp.
|
inlinenoexcept |
Definition at line 166 of file utils/containers/interval_tree/node.hpp.
|
inline |
Return the left node (readonly).
Definition at line 190 of file utils/containers/interval_tree/node.hpp.
|
inline |
Return the lower bound of the interval of this node.
Definition at line 221 of file utils/containers/interval_tree/node.hpp.
|
inline |
Definition at line 151 of file utils/containers/interval_tree/node.hpp.
|
default |
|
default |
|
inline |
Return the parent node up the tree.
Definition at line 182 of file utils/containers/interval_tree/node.hpp.
|
inline |
Return the right node (readonly).
Definition at line 198 of file utils/containers/interval_tree/node.hpp.
using data_type = DataType |
Definition at line 99 of file utils/containers/interval_tree/node.hpp.
using interval_kind = IntervalKind |
Definition at line 101 of file utils/containers/interval_tree/node.hpp.
using interval_type = Interval<DataType, NumericalType, IntervalKind> |
Definition at line 103 of file utils/containers/interval_tree/node.hpp.
using node_type = IntervalTreeNode<DataType, NumericalType, IntervalKind> |
Definition at line 104 of file utils/containers/interval_tree/node.hpp.
using numerical_type = NumericalType |
Definition at line 100 of file utils/containers/interval_tree/node.hpp.
Definition at line 108 of file utils/containers/interval_tree/node.hpp.
using tree_type = IntervalTree<DataType, NumericalType, IntervalKind> |
Definition at line 105 of file utils/containers/interval_tree/node.hpp.
friend IntervalTree< DataType, NumericalType, IntervalKind > |
Definition at line 111 of file utils/containers/interval_tree/node.hpp.
friend IntervalTreeIterator< node_type, false > |
Definition at line 113 of file utils/containers/interval_tree/node.hpp.
friend IntervalTreeIterator< node_type, true > |
Definition at line 112 of file utils/containers/interval_tree/node.hpp.