Sundance::IntHashSet Class Reference

List of all members.

Public Member Functions

 IntHashSet ()
void setCapacity (int capacity)
void put (int x)
bool contains (int x) const
int size () const
void fillArray (int *a) const

Private Member Functions

int hashFunc (const int key) const

Static Private Member Functions

static unsigned int seed ()

Private Attributes

unsigned int capacity_
Array< std::list< int > > data_
int size_


Detailed Description

Definition at line 47 of file SundanceIntHashSet.hpp.


Constructor & Destructor Documentation

IntHashSet::IntHashSet (  ) 

Definition at line 8 of file SundanceIntHashSet.cpp.


Member Function Documentation

bool IntHashSet::contains ( int  x  )  const

Definition at line 23 of file SundanceIntHashSet.cpp.

References data_, and hashFunc().

void IntHashSet::fillArray ( int *  a  )  const

Definition at line 34 of file SundanceIntHashSet.cpp.

References data_.

int Sundance::IntHashSet::hashFunc ( const int  key  )  const [inline, private]

Definition at line 80 of file SundanceIntHashSet.hpp.

References capacity_, and seed().

Referenced by contains(), and put().

void Sundance::IntHashSet::put ( int  x  )  [inline]

Definition at line 57 of file SundanceIntHashSet.hpp.

References data_, hashFunc(), and size_.

static unsigned int Sundance::IntHashSet::seed (  )  [inline, static, private]

Definition at line 82 of file SundanceIntHashSet.hpp.

Referenced by hashFunc().

void IntHashSet::setCapacity ( int  capacity  ) 

Definition at line 14 of file SundanceIntHashSet.cpp.

References capacity_, and data_.

int Sundance::IntHashSet::size (  )  const [inline]

Definition at line 73 of file SundanceIntHashSet.hpp.

References size_.


Member Data Documentation

unsigned int Sundance::IntHashSet::capacity_ [private]

Definition at line 83 of file SundanceIntHashSet.hpp.

Referenced by hashFunc(), and setCapacity().

Array<std::list<int> > Sundance::IntHashSet::data_ [private]

Definition at line 84 of file SundanceIntHashSet.hpp.

Referenced by contains(), fillArray(), put(), and setCapacity().

Definition at line 85 of file SundanceIntHashSet.hpp.

Referenced by put(), and size().

Site Contact