User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Hash Tables - HSetC<class T>
 

  PUBLIC
HSetC::HSetC(void)
HSetC::HSetC(istream &)
HSetC::HSetC(const HSetC &)
HSetC::Copy(void) const
HSetC::IsMember(const T &) const
HSetC::Contains(const T &) const
HSetC::operator [](const T &) const
HSetC::Insert(const T &)
HSetC::Remove(const T &)
HSetC::Empty(void)
HSetC::Size(void) const
HSetC::operator +=(const T &)
HSetC::operator -=(const T &)
HSetC::operator +=(const HSetC &)
HSetC::operator -=(const HSetC &)
HSetC::Random(void) const
HSetC::First(void) const
HSetC::IsEmpty(void) const
HSetC::Union(const HSetC &) const
HSetC::UnionIP(const HSetC &)
HSetC::Intersect(const HSetC &) const
HSetC::IntersectIP(const HSetC &)
HSetC::Disjunction(const HSetC &) const
HSetC::DisjunctionIP(const HSetC &)
HSetC::IsSubset(const HSetC &) const
HSetC::Contains(const HSetC &) const
HSetC::operator ==(const HSetC &) const
HSetC::operator !=(const HSetC &) const
HSetC::AddFrom(HSetC &)

   HSetC<class T>   
 
Set of objects.
 
include "Ravl/HSet.hh"
Created:2/9/1996 
User Level:Normal
Library:RavlCore
In Scope:RavlN

Comments:
This is based on the templated hash tables. Object must provide the Hash function needed by HashC. see "amma/Hash.hh"

BIG OBJECT

Variables:
Methods:
HSetC()
Default constructor.

HSetC(istream & in)
stream constructor.

HSetC(const HSetC<T> & Oth)
Copy constructor.

HSetC<T> Copy() const
Make a Shallow copy of the set.

bool IsMember(const T & It) const
Is 'It' a member of the set ?

bool Contains(const T & It) const
Is 'It' a member of the set ?

bool operator [](const T & It) const
Is 'It' a member of the set ?

bool Insert(const T & It)
Insert an element into the set.
Ret = False, member already present. True, new member added.

bool Remove(const T & It)
Remove an item from the set.
Ret = True, item removed. False, item not in set.

void Empty()
Remove everthing from the set.

UIntT Size() const
Number of elements in set.

HSetC<T> & operator +=(const T & dat)
Add a member to the set.

HSetC<T> & operator -=(const T & dat)
Remove a member from the set.

HSetC<T> & operator +=(const HSetC<T> & dat)
Add a set to this set.

HSetC<T> & operator -=(const HSetC<T> & dat)
Remove a set from this one.

const T & Random() const
Select a random member of the set.
NOTE: It is the user's responsibility to ensure the set it not empty when this function is called.

const T & First() const
Return the first member of the set.
The exact member this returns is undefined, but it is not random.

NOTE: It is the user's responsibility to ensure the set it not empty when this function is called.


bool IsEmpty() const
Test if the set is empty.

HSetC<T> Union(const HSetC<T> & Oth) const
Get Union of another set with this one.

bool UnionIP(const HSetC<T> & Oth)
Get Union of another set with this one.
Returns true when resulting set in non-empty.

HSetC<T> Intersect(const HSetC<T> & Oth) const
Get intersection of another set with this one.

bool IntersectIP(const HSetC<T> & Oth)
Intersect this set with another (In Place)
Returns true when resulting set in non-empty.

HSetC<T> Disjunction(const HSetC<T> & Oth) const
Return the items in either set but not in both.

bool DisjunctionIP(const HSetC<T> & Oth)
Return the items in either set but not in both. (In Place).
Returns true when resulting set in non-empty.

bool IsSubset(const HSetC<T> & oth) const
is oth a subset of this ?

bool Contains(const HSetC<T> & ss) const
is ss a subset of this one.

bool operator ==(const HSetC<T> & oth) const
Is equal, ie contains all the same members ?

bool operator !=(const HSetC<T> & oth) const
Is not equal, ie contains different members ?

void AddFrom(HSetC<T> & oth)
Add contents of another set into this one.
leave other empty. More comming soon.... (Or on request. )


Maintainer:Charles Galambos, Created: 2/9/1996, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002