Set
|
 |
An implementation of the
mathematical notion of set. A sequential access container.
Implemented via circular list.
For iteration see Iterator.
Declaration
#include<ospace/advanced/Set.h>
template
<
class Instantiator
>
class os_Set
Constructor
os_Set(void)
This the default
constructor.
Destructor
~os_Set()
Destroys all entries in
the set.
operator
=
os_Set<T>& operator=(const
os_Set<T>&)
Replaces contents of one
set with another..
operator
==
int
operator==(const os_Set<T>&)
Returns 1 (true) if two
sets contain items that are equal to one another, otherwise returns 0
(false).
operator
!=
int
operator!=(const os_Set<T>&)
The negation of
operator==, above.
make_empty
os_Set&
make_empty(void)
Removes and destroys the
contents. The set is in state of initial construction.
Size
unsigned int Size(void)
Returns the number of
items in the set.
join
os_Set<T>&
join(const os_Set<T>&
s)
The object becomes the
union of itself and the set s.
cross
os_Set<T>&
corss(const os_Set<T>&
s)
The object becomes the
intersection of itself and the set s.
complement
os_Set<T>&
complement(const os_Set<T>&
s)
The object becomes the
relative complement of s. That is, the object becomes disjoint from s.
difference
os_Set<T>&
difference(const os_Set<T>&
s)
The object becomes the
symmetric difference of itself and s.
subset
int
subset(const os_Set<T>&
s)
Returns 1 (true) if s is
a subset of object. Otherwise returns 0 (false).
member
int
member(const T& m)
Returns 1 (true) if m
belongs to object. Otherwise returns 0 (false).
Copyright©2005-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.