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

You must derive your own traits class from this class template, telling the DynamicSegmentTree how to interact with your node class. More...

#include <dynamic_segment_tree.hpp>

Public Types

using KeyT = typename Node::KeyT
 
using ValueT = typename Node::ValueT
 

Static Public Member Functions

static KeyT get_lower (const Node &n)
 
static KeyT get_upper (const Node &n)
 
static bool is_lower_closed (const Node &n)
 
static bool is_upper_closed (const Node &n)
 
static ValueT get_value (const Node &n)
 

Detailed Description

template<class Node>
class ygg::DynSegTreeNodeTraits< Node >

You must derive your own traits class from this class template, telling the DynamicSegmentTree how to interact with your node class.

You must derive from this class template and supply the DynamicSegmentTree with your own derived class. At the least, you have to implement the methods get_lower, get_upper and get_value for the DynamicSegmentTree to work. See the respective methods' documentation for details.

Template Parameters
NodeYour node class to be used in the DynamicSegmentTree, derived from DynSegTreeNodeBase

Member Typedef Documentation

◆ KeyT

template<class Node >
using ygg::DynSegTreeNodeTraits< Node >::KeyT = typename Node::KeyT

The type of the borders of intervals / segments in the DynamicSegmentTree

◆ ValueT

template<class Node >
using ygg::DynSegTreeNodeTraits< Node >::ValueT = typename Node::ValueT

The type of the values associated with the intervals in the DynamicSegmentTree

Member Function Documentation

◆ get_lower()

template<class Node >
static KeyT ygg::DynSegTreeNodeTraits< Node >::get_lower ( const Node &  n)
static

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 KeyT ygg::DynSegTreeNodeTraits< Node >::get_upper ( const Node &  n)
static

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

◆ get_value()

template<class Node >
static ValueT ygg::DynSegTreeNodeTraits< Node >::get_value ( const Node &  n)
static

Must be implemented to return the value associated with the interval represented by n.

Parameters
nThe node whose associated value should be returned
Returns
Must return the value associated with n

◆ is_lower_closed()

template<class Node >
static bool ygg::DynSegTreeNodeTraits< Node >::is_lower_closed ( const Node &  n)
inlinestatic

Should be implemented to indicate whether an interval contains its lower border or not.

The default (if this method is not implemented) is true.

◆ is_upper_closed()

template<class Node >
static bool ygg::DynSegTreeNodeTraits< Node >::is_upper_closed ( const Node &  n)
inlinestatic

Should be implemented to indicate whether an interval contains its upper border or not.

The default (if this method is not implemented) is false.


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