m2etis  0.4
m2etis::util::SegmentTree< T > Class Template Reference

SegmentTree handles integer values and stores segments of set values e.g. inserting values 2, 3 and 4 results in a segment [2,4]. More...

#include <SegmentTree.h>

Inheritance diagram for m2etis::util::SegmentTree< T >:
Inheritance graph

Public Member Functions

 SegmentTree ()
 
 ~SegmentTree ()
 
void insert (const T &value)
 inserts a value into the tree More...
 
bool contains (const T &value)
 returns whether value is stored in the tree or not More...
 
size_t size () const
 returns the amount of segments, is always <= count() More...
 
size_t count () const
 returns the amount of stored elements More...
 

Detailed Description

template<typename T>
class m2etis::util::SegmentTree< T >

SegmentTree handles integer values and stores segments of set values e.g. inserting values 2, 3 and 4 results in a segment [2,4].

Definition at line 37 of file SegmentTree.h.

Constructor & Destructor Documentation

template<typename T>
m2etis::util::SegmentTree< T >::SegmentTree ( )
inline

Definition at line 39 of file SegmentTree.h.

template<typename T>
m2etis::util::SegmentTree< T >::~SegmentTree ( )
inline

Definition at line 42 of file SegmentTree.h.

Member Function Documentation

template<typename T>
bool m2etis::util::SegmentTree< T >::contains ( const T &  value)
inline

returns whether value is stored in the tree or not

Definition at line 94 of file SegmentTree.h.

Here is the caller graph for this function:

template<typename T>
size_t m2etis::util::SegmentTree< T >::count ( ) const
inline

returns the amount of stored elements

Definition at line 122 of file SegmentTree.h.

template<typename T>
void m2etis::util::SegmentTree< T >::insert ( const T &  value)
inline

inserts a value into the tree

Definition at line 49 of file SegmentTree.h.

template<typename T>
size_t m2etis::util::SegmentTree< T >::size ( ) const
inline

returns the amount of segments, is always <= count()

Definition at line 115 of file SegmentTree.h.


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