Lunchbox
1.12.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 <unorderedIntervalSet.h>
Public Member Functions | |
UnorderedIntervalSet () | |
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 UnorderedIntervalSet &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 (UnorderedIntervalSet &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. The intervals are stored in an unordered fashion. Not thread-safe.
Example:
Definition at line 37 of file unorderedIntervalSet.h.
lunchbox::UnorderedIntervalSet< T >::UnorderedIntervalSet | ( | ) |
Construct a new interval set.
const_iterator lunchbox::UnorderedIntervalSet< T >::begin | ( | ) | const |
void lunchbox::UnorderedIntervalSet< T >::clear | ( | ) |
Remove all stored elements.
bool lunchbox::UnorderedIntervalSet< T >::empty | ( | ) | const |
const_iterator lunchbox::UnorderedIntervalSet< T >::end | ( | ) | const |
void lunchbox::UnorderedIntervalSet< T >::erase | ( | const T & | element | ) |
Remove the given element.
void lunchbox::UnorderedIntervalSet< T >::erase | ( | const T & | startElement, |
const T & | endElement | ||
) |
Remove all element inside the given closed interval.
bool lunchbox::UnorderedIntervalSet< T >::exists | ( | const T & | element | ) | const |
const_iterator lunchbox::UnorderedIntervalSet< T >::find | ( | const T & | element | ) | const |
void lunchbox::UnorderedIntervalSet< T >::insert | ( | const T & | element | ) |
Insert a new element.
void lunchbox::UnorderedIntervalSet< T >::insert | ( | const T & | startElement, |
const T & | endElement | ||
) |
Insert a new closed interval of elements.
void lunchbox::UnorderedIntervalSet< T >::insert | ( | const UnorderedIntervalSet< T > & | rhs | ) |
Insert another interval set into this.
size_t lunchbox::UnorderedIntervalSet< T >::size | ( | ) | const |
void lunchbox::UnorderedIntervalSet< T >::swap | ( | UnorderedIntervalSet< T > & | rhs | ) |
Swap this container with another one.