Lunchbox
1.8.0
|
A container to store intervals of elements efficently. More...
#include <unorderedIntervalSet.h>
Classes | |
struct | EdgeCompare |
Public Member Functions | |
UnorderedIntervalSet () | |
Construct a new interval set. | |
void | insert (const T &element) |
Insert a new element. | |
void | insert (const T &startElement, const T &endElement) |
Insert a new closed interval of elements. | |
void | insert (const UnorderedIntervalSet &rhs) |
Insert another interval set into this. | |
void | erase (const T &element) |
Remove the given element. | |
void | erase (const T &startElement, const T &endElement) |
Remove all element inside the given closed interval. | |
void | clear () |
Remove all stored elements. | |
void | swap (UnorderedIntervalSet &rhs) |
Swap this container with another one. | |
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.
Definition at line 35 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.