A library for working with phylogenetic and population genetic data.
v0.32.0
IntervalTreeIterator< NodeType, is_const > Class Template Reference

#include <genesis/utils/containers/interval_tree/fwd.hpp>

Detailed Description

template<typename NodeType, bool is_const = true>
class genesis::utils::IntervalTreeIterator< NodeType, is_const >

Iterate the Intervals stored 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, IntervalTreeNode, and IntervalTree for the other classes based on the original code.

Definition at line 51 of file fwd.hpp.

Public Member Functions

 IntervalTreeIterator (IntervalTreeIterator &&)=default
 
 IntervalTreeIterator (IntervalTreeIterator const &)=default
 
 ~IntervalTreeIterator ()=default
 
RedBackColor color () const
 Return the color of the node. More...
 
interval_type const & interval () const
 
self_type left () const
 Continue down the left side of this node. More...
 
numerical_type max () const
 Return the max property of the node. More...
 
bool operator!= (IntervalTreeIterator const &other) const
 
interval_type const & operator* () const
 
self_typeoperator++ ()
 
self_type operator++ (int)
 
value_type const * operator-> () const
 
IntervalTreeIteratoroperator= (IntervalTreeIterator &&)=default
 
IntervalTreeIteratoroperator= (IntervalTreeIterator const &)=default
 
bool operator== (IntervalTreeIterator const &other) const
 
self_type parent () const
 Return an iterator to the parent of this node. More...
 
self_type right () const
 Continue down the right side of this node. More...
 

Public Types

using data_type = typename NodeType::data_type
 
using interval_kind = typename NodeType::interval_kind
 
using interval_type = typename NodeType::interval_type
 
using node_ptr_t = typename std::conditional< is_const, node_type const *, node_type * >::type
 
using node_type = NodeType
 
using numerical_type = typename NodeType::numerical_type
 
using owner_type = typename std::conditional< is_const, tree_type const *, tree_type * >::type
 
using self_type = IntervalTreeIterator< NodeType, is_const >
 
using tree_type = IntervalTree< data_type, numerical_type, interval_kind >
 
using value_type = NodeType
 

Public Attributes

friend IntervalTree< data_type, numerical_type, interval_kind >
 

Constructor & Destructor Documentation

◆ ~IntervalTreeIterator()

~IntervalTreeIterator ( )
default

◆ IntervalTreeIterator() [1/2]

IntervalTreeIterator ( IntervalTreeIterator< NodeType, is_const > const &  )
default

◆ IntervalTreeIterator() [2/2]

IntervalTreeIterator ( IntervalTreeIterator< NodeType, is_const > &&  )
default

Member Function Documentation

◆ color()

RedBackColor color ( ) const
inline

Return the color of the node.

Definition at line 237 of file containers/interval_tree/iterator.hpp.

◆ interval()

interval_type const& interval ( ) const
inline

Definition at line 242 of file containers/interval_tree/iterator.hpp.

◆ left()

self_type left ( ) const
inline

Continue down the left side of this node.

Will equal std::end(tree) if there is no left node.

Definition at line 205 of file containers/interval_tree/iterator.hpp.

◆ max()

numerical_type max ( ) const
inline

Return the max property of the node.

Definition at line 229 of file containers/interval_tree/iterator.hpp.

◆ operator!=()

bool operator!= ( IntervalTreeIterator< NodeType, is_const > const &  other) const
inline

Definition at line 123 of file containers/interval_tree/iterator.hpp.

◆ operator*()

interval_type const& operator* ( ) const
inline

Definition at line 169 of file containers/interval_tree/iterator.hpp.

◆ operator++() [1/2]

self_type& operator++ ( )
inline

Definition at line 133 of file containers/interval_tree/iterator.hpp.

◆ operator++() [2/2]

self_type operator++ ( int  )
inline

Definition at line 162 of file containers/interval_tree/iterator.hpp.

◆ operator->()

value_type const* operator-> ( ) const
inline

Definition at line 178 of file containers/interval_tree/iterator.hpp.

◆ operator=() [1/2]

IntervalTreeIterator& operator= ( IntervalTreeIterator< NodeType, is_const > &&  )
default

◆ operator=() [2/2]

IntervalTreeIterator& operator= ( IntervalTreeIterator< NodeType, is_const > const &  )
default

◆ operator==()

bool operator== ( IntervalTreeIterator< NodeType, is_const > const &  other) const
inline

Definition at line 128 of file containers/interval_tree/iterator.hpp.

◆ parent()

self_type parent ( ) const
inline

Return an iterator to the parent of this node.

Will equal std::end(tree) if there is no parent node.

Definition at line 192 of file containers/interval_tree/iterator.hpp.

◆ right()

self_type right ( ) const
inline

Continue down the right side of this node.

Will equal std::end(tree) if there is no right node.

Definition at line 218 of file containers/interval_tree/iterator.hpp.

Member Typedef Documentation

◆ data_type

using data_type = typename NodeType::data_type

Definition at line 80 of file containers/interval_tree/iterator.hpp.

◆ interval_kind

using interval_kind = typename NodeType::interval_kind

Definition at line 82 of file containers/interval_tree/iterator.hpp.

◆ interval_type

using interval_type = typename NodeType::interval_type

Definition at line 83 of file containers/interval_tree/iterator.hpp.

◆ node_ptr_t

using node_ptr_t = typename std::conditional< is_const, node_type const*, node_type* >::type

Definition at line 91 of file containers/interval_tree/iterator.hpp.

◆ node_type

using node_type = NodeType

Definition at line 85 of file containers/interval_tree/iterator.hpp.

◆ numerical_type

using numerical_type = typename NodeType::numerical_type

Definition at line 81 of file containers/interval_tree/iterator.hpp.

◆ owner_type

using owner_type = typename std::conditional< is_const, tree_type const*, tree_type* >::type

Definition at line 92 of file containers/interval_tree/iterator.hpp.

◆ self_type

using self_type = IntervalTreeIterator<NodeType, is_const>

Definition at line 88 of file containers/interval_tree/iterator.hpp.

◆ tree_type

◆ value_type

using value_type = NodeType

Definition at line 89 of file containers/interval_tree/iterator.hpp.

Member Data Documentation

◆ IntervalTree< data_type, numerical_type, interval_kind >


The documentation for this class was generated from the following files: