|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
21 #ifndef ELM_AVL_SET_H_
22 #define ELM_AVL_SET_H_
24 #include <elm/avl/GenTree.h>
26 namespace elm {
namespace avl {
28 template <
class T,
class C = elm::Comparator<T> >
46 int c = C::doCompare(*i, *j);
48 else if(c < 0)
return false;
58 for(
const auto x: *
this)
if(s.
contains(x))
is.add(x);
bool subsetOf(const Set< T, C > &s) const
Definition: Set.h:43
void insert(const T &x)
Definition: Set.h:41
self_t & operator+=(const T &x)
Definition: Set.h:36
self_t & operator=(const self_t &s)
Definition: Set.h:38
void remove(const T &x)
Definition: GenTree.h:232
bool contains(const typename IdAdapter< T > ::key_t &item) const
Definition: GenTree.h:158
self_t operator&(const Set< T, C > &s) const
Definition: Set.h:71
void diff(const Set< T, C > &s)
Definition: Set.h:55
self_t & operator&=(const Set< T, C > &s)
Definition: Set.h:64
void meet(const Set< T, C > &s)
Definition: Set.h:56
Iter begin(void) const
Definition: GenTree.h:192
self_t operator|(const Set< T, C > &s) const
Definition: Set.h:68
GenTree< T, IdAdapter< T >, C > base_t
Definition: Set.h:33
self_t & operator|=(const Set< T, C > &s)
Definition: Set.h:62
self_t operator-(const Set< T, C > &s) const
Definition: Set.h:69
self_t & operator*=(const Set< T, C > &s)
Definition: Set.h:65
self_t operator+(const Set< T, C > &s) const
Definition: Set.h:67
self_t operator*(const Set< T, C > &s) const
Definition: Set.h:70
void add(const T &item)
Definition: GenTree.h:222
void join(const Set< T, C > &s)
Definition: Set.h:54
self_t & operator-=(const Set< T, C > &s)
Definition: Set.h:63
Set< T, C > self_t
Definition: Set.h:32
self_t & operator+=(const Set< T, C > &s)
Definition: Set.h:61
static bool is(unsigned char c, t::uint64 set[])
Definition: string_Char.cpp:36
void copy(const GenTree< T, K, C > &tree)
Definition: GenTree.h:242
self_t & operator-=(const T &x)
Definition: Set.h:37