#include <cset.h>
Public Methods | |
Cset (const CrossMap<T>* cmap, bool is_empty = true) | |
Constructor. More... | |
bool | is_member (T v) const |
Membership test. More... | |
void | add_member (T v) const |
Add a member to this set. More... | |
void | remove_member (T v) const |
Remove a member from this set. More... | |
bool | do_intersect (const Cset* that) |
this = this ^ that. More... | |
bool | do_union (const Cset* that) |
this = this U that. More... | |
bool | do_subtract (const Cset* that) |
this = this - that. More... | |
bool | do_complement (coid) |
Set to the complement of another set. More... | |
typedef | String (StringifyF)(T) |
String | to_string (StringifyF* func) |
All Csets that share a common universe must share the same CrossMap instance.
|
Constructor.
cmap | the CrossMap holding the universe of this set. |
is_empty | if true the new set will be empty, otherwise it will be full. |
|
|
Add a member to this set.
v | the element to be added. |
|
Set to the complement of another set.
c |
|
|
this = this ^ that.
that | the set to intersect with. |
|
this = this - that.
that | the set to intersect with. |
|
this = this U that.
that | the set to intersect with. |
|
Membership test.
v | a possible element. |
|
Remove a member from this set.
v | the element to be removed. |
|