Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
numeric::DietNode< T > Class Template Reference

#include <DiscreteIntervalEncodingTree.hh>

Inheritance diagram for numeric::DietNode< T >:
Inheritance graph
[legend]

Classes

struct  split_tuple
 

Public Types

typedef T Value
 
typedef
utility::pointer::shared_ptr
< DietNode< Value > > 
DietNodeOP
 
typedef std::list< std::pair
< Value, Value > > 
RangeList
 

Public Member Functions

 DietNode (Value value)
 
bool member (Value val) const
 Return whether a particular value is contained by any of the ranges in the subtree rooted at this node. More...
 
split_tuple split_max (DietNodeOP parent)
 Return the tuple of the largest value of the left child and the node that is the parent of that largest value. More...
 
split_tuple split_min (DietNodeOP parent)
 Return the tuple of the smallest value of the right child and the node that is the parent of that smallest value. More...
 
void join_left (Value new_lower)
 Used in insert( val ) where val + 1 == lower_; this may reorder nodes in the tree. More...
 
void join_right (Value new_upper)
 
void insert (Value new_val)
 
int size () const
 
void inorder_range_list (RangeList &ranges) const
 
bool correct (RangeList &ranges) const
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Private Attributes

Value lower_
 
Value upper_
 
DietNodeOP left_
 
DietNodeOP right_
 

Member Typedef Documentation

template<class T >
typedef utility::pointer::shared_ptr< DietNode< Value > > numeric::DietNode< T >::DietNodeOP
template<class T >
typedef std::list< std::pair< Value, Value > > numeric::DietNode< T >::RangeList
template<class T >
typedef T numeric::DietNode< T >::Value

Constructor & Destructor Documentation

template<class T >
numeric::DietNode< T >::DietNode ( Value  value)
inline

Member Function Documentation

template<class T >
bool numeric::DietNode< T >::correct ( RangeList ranges) const
inline
template<class T >
void numeric::DietNode< T >::inorder_range_list ( RangeList ranges) const
inline
template<class T >
void numeric::DietNode< T >::insert ( Value  new_val)
inline
template<class T >
void numeric::DietNode< T >::join_left ( Value  new_lower)
inline
template<class T >
void numeric::DietNode< T >::join_right ( Value  new_upper)
inline
template<class T >
bool numeric::DietNode< T >::member ( Value  val) const
inline

Return whether a particular value is contained by any of the ranges in the subtree rooted at this node.

References numeric::DietNode< T >::left_, numeric::DietNode< T >::lower_, numeric::DietNode< T >::right_, and numeric::DietNode< T >::upper_.

template<class T >
int numeric::DietNode< T >::size ( ) const
inline
template<class T >
split_tuple numeric::DietNode< T >::split_max ( DietNodeOP  parent)
inline

Return the tuple of the largest value of the left child and the node that is the parent of that largest value.

References numeric::DietNode< T >::right_, and numeric::DietNode< T >::upper_.

template<class T >
split_tuple numeric::DietNode< T >::split_min ( DietNodeOP  parent)
inline

Return the tuple of the smallest value of the right child and the node that is the parent of that smallest value.

References numeric::DietNode< T >::left_, and numeric::DietNode< T >::lower_.

Member Data Documentation

template<class T >
DietNodeOP numeric::DietNode< T >::left_
private
template<class T >
Value numeric::DietNode< T >::lower_
private
template<class T >
DietNodeOP numeric::DietNode< T >::right_
private
template<class T >
Value numeric::DietNode< T >::upper_
private

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