template<typename T>
class walberla::Set< T >
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:
bool boolean = ( A == B );
boolean = ( A != B );
boolean = ( A > B );
boolean = ( A >= B );
boolean = ( A < B );
boolean = ( A == C );
B.insert(3);
boolean = ( A == B );
boolean = ( A > B );
boolean = ( A >= B );
boolean = ( A <= B );
Wrapper class for managing sets that store elements of type T.
Definition Set.h:85
bool equalSize(const Set< T > &set) const
compares the size (not the content!) of two sets
Definition Set.h:121
|
| 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) |
|
void | clear () |
| removes all elements from this set
|
|
const Set< T > & | operator&= (const Set< T > &set) |
| intersection
|
|
const Set< T > & | operator+= (const Set< T > &set) |
| union
|
|
const Set< T > & | operator-= (const Set< T > &set) |
| difference / relative complement
|
|
bool | operator< (const Set< T > &set) const |
| compares the size (not the content!) of two sets
|
|
bool | operator> (const Set< T > &set) const |
| compares the size (not the content!) of two sets
|
|
bool | operator<= (const Set< T > &set) const |
| compares the size (not the content!) of two sets
|
|
bool | operator>= (const Set< T > &set) const |
| compares the size (not the content!) of two sets
|
|
bool | equalSize (const Set< T > &set) const |
| compares the size (not the content!) of two sets
|
|
bool | intersects (const Set< T > &set) const |
| true if both sets intersect
|
|
bool | contains (const Set< T > &set) const |
| true if "set" is completely contained within this set
|
|
bool | contains (const T &element) const |
| true if "element" is contained within this set
|
|
bool | isEqual (const Set< T > &set) const |
| true if both sets contain the same elements
|
|
bool | empty () const |
| true if this set is empty
|
|
bool | isEmpty () const |
| true if this set is empty
|
|
size_t | size () const |
|
void | swap (Set< T > &set) noexcept |
|
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 () |
|