Yggdrasill  0.2
Public Types | Static Public Member Functions | List of all members
ygg::ITreeNodeTraits< Node > Class Template Reference

Abstract base class for the Node Traits that need to be implemented. More...

#include <intervaltree.hpp>

Public Types

using key_type = void
 The type of your interval bounds. This is the type that get_lower() and get_upper() must return. This type must be comparable, i.e., operator< etc. must be implemented.
 

Static Public Member Functions

static key_type get_lower (const Node &n)=delete
 
static key_type get_upper (const Node &n)=delete
 

Detailed Description

template<class Node>
class ygg::ITreeNodeTraits< Node >

Abstract base class for the Node Traits that need to be implemented.

Every Interval Tree needs to be supplied with a node traits class that must be derived from this class. In your derived class, you must define the key_type as the type of your interval's bounds, and you must implement get_lower() and get_upper() to return the interval bounds of your nodes.

Member Function Documentation

◆ get_lower()

template<class Node >
static key_type ygg::ITreeNodeTraits< Node >::get_lower ( const Node &  n)
staticdelete

Must be implemented to return the lower bound of the interval represented by n.

Parameters
nThe node whose lower interval bound should be returned.
Returns
Must return the lower interval bound of n

◆ get_upper()

template<class Node >
static key_type ygg::ITreeNodeTraits< Node >::get_upper ( const Node &  n)
staticdelete

Must be implemented to return the upper bound of the interval represented by n.

Parameters
nThe node whose upper interval bound should be returned.
Returns
Must return the upper interval bound of n

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