Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Cset Class Reference

A Cset represents a set whose universe is represented by a CrossMap. More...

#include <cset.h>

List of all members.

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)


Detailed Description

template<class T> class Cset

A Cset represents a set whose universe is represented by a CrossMap.

All Csets that share a common universe must share the same CrossMap instance.

See also:
CrossMap , BitVectorSet


Constructor & Destructor Documentation

template<class T>
Cset<T>::Cset<T> (
const CrossMap<T>* cmap,
bool is_empty = true)

Constructor.

Parameters:
cmap   the CrossMap holding the universe of this set.
is_empty   if true the new set will be empty, otherwise it will be full.

Member Function Documentation

template<class T>
typedef Cset<T>::String (
StringifyF)

template<class T>
void Cset<T>::add_member (
T v) const [inline]

Add a member to this set.

Parameters:
v   the element to be added.

template<class T>
bool Cset<T>::do_complement (
coid) [inline]

Set to the complement of another set.

Parameters:
c  

Set this set to the complement of c.

template<class T>
bool Cset<T>::do_intersect (
const Cset<T> * that) [inline]

this = this ^ that.

Parameters:
that   the set to intersect with.

template<class T>
bool Cset<T>::do_subtract (
const Cset<T> * that) [inline]

this = this - that.

Parameters:
that   the set to intersect with.

template<class T>
bool Cset<T>::do_union (
const Cset<T> * that) [inline]

this = this U that.

Parameters:
that   the set to intersect with.

template<class T>
bool Cset<T>::is_member (
T v) const [inline]

Membership test.

Returns:
true if /a v is a member in this set.
Parameters:
v   a possible element.

template<class T>
void Cset<T>::remove_member (
T v) const [inline]

Remove a member from this set.

Parameters:
v   the element to be removed.

template<class T>
String Cset<T>::to_string (
StringifyF * func) [inline]


The documentation for this class was generated from the following file:
Generated at Mon Jul 31 13:43:03 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000