Wrapper class for managing sets that store elements of type T.
If the equality of two sets must be tested, the operators "==" and "!=" and the member function "isEqual" can be used. If two sets must be compared in terms of size, the operators "<", ">", "<=", and ">=" and the member function "equalSize" can be used:
#include <Set.h>
Public Types | |
using | value_type = typename std::set< T >::value_type |
using | const_iterator = typename std::set< T >::const_iterator |
using | iterator = typename std::set< T >::iterator |
Public Member Functions | |
Set ()=default | |
Set (const T &element) | |
virtual | ~Set ()=default |
std::pair< iterator, bool > | insert (const T &element) |
iterator | insert (iterator position, const T &element) |
template<class InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
const Set< T > & | operator&= (const Set< T > &set) |
intersection More... | |
const Set< T > & | operator+= (const Set< T > &set) |
union More... | |
const Set< T > & | operator-= (const Set< T > &set) |
difference / relative complement More... | |
size_t | size () const |
void | swap (Set< T > &set) |
void | toStream (std::ostream &os) const |
std::string | toString () const |
const_iterator | begin () const |
iterator | begin () |
const_iterator | end () const |
iterator | end () |
const std::set< T > & | get () const |
std::set< T > & | get () |
Static Public Member Functions | |
static const Set< T > | emptySet () |
Private Attributes | |
std::set< T > | set_ |
using walberla::Set< T >::const_iterator = typename std::set<T>::const_iterator |
using walberla::Set< T >::iterator = typename std::set<T>::iterator |
using walberla::Set< T >::value_type = typename std::set<T>::value_type |
|
inlinedefault |
|
inline |
|
inlinevirtualdefault |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
intersection
Calculates the intersection of "this" and "set", only the resulting set is kept.
|
inline |
union
Calculates the union of "this" and "set", only the resulting set is kept.
|
inline |
difference / relative complement
Calculates the difference of "this" and "set", only the resulting set (result = this - set) is kept.
|
inline |
|
inline |
void walberla::Set< T >::toStream | ( | std::ostream & | os | ) | const |
|
inline |
|
private |