Lunchbox
1.15.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
|
A container to store intervals of elements efficently. More...
#include <intervalSet.h>
Public Member Functions | |
IntervalSet () | |
Construct a new interval set. More... | |
void | insert (const T &element) |
Insert a new element. More... | |
void | insert (const T &startElement, const T &endElement) |
Insert a new closed interval of elements. More... | |
void | insert (const IntervalSet &rhs) |
Insert another interval set into this. More... | |
void | erase (const T &element) |
Remove the given element. More... | |
void | erase (const T &startElement, const T &endElement) |
Remove all element inside the given closed interval. More... | |
void | clear () |
Remove all stored elements. More... | |
void | swap (IntervalSet &rhs) |
Swap this container with another one. More... | |
bool | exists (const T &element) const |
const_iterator | find (const T &element) const |
const_iterator | begin () const |
const_iterator | end () const |
size_t | size () const |
bool | empty () const |
A container to store intervals of elements efficently.
The type can be any class or typename which has the semantics of natural numbers for addition and comparison operations. Not thread-safe.
Example:
Definition at line 36 of file intervalSet.h.
lunchbox::IntervalSet< T >::IntervalSet | ( | ) |
Construct a new interval set.
const_iterator lunchbox::IntervalSet< T >::begin | ( | ) | const |
void lunchbox::IntervalSet< T >::clear | ( | ) |
Remove all stored elements.
bool lunchbox::IntervalSet< T >::empty | ( | ) | const |
const_iterator lunchbox::IntervalSet< T >::end | ( | ) | const |
void lunchbox::IntervalSet< T >::erase | ( | const T & | element | ) |
Remove the given element.
void lunchbox::IntervalSet< T >::erase | ( | const T & | startElement, |
const T & | endElement | ||
) |
Remove all element inside the given closed interval.
bool lunchbox::IntervalSet< T >::exists | ( | const T & | element | ) | const |
const_iterator lunchbox::IntervalSet< T >::find | ( | const T & | element | ) | const |
void lunchbox::IntervalSet< T >::insert | ( | const T & | element | ) |
Insert a new element.
void lunchbox::IntervalSet< T >::insert | ( | const T & | startElement, |
const T & | endElement | ||
) |
Insert a new closed interval of elements.
void lunchbox::IntervalSet< T >::insert | ( | const IntervalSet< T > & | rhs | ) |
Insert another interval set into this.
size_t lunchbox::IntervalSet< T >::size | ( | ) | const |
void lunchbox::IntervalSet< T >::swap | ( | IntervalSet< T > & | rhs | ) |
Swap this container with another one.