Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
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 58 of file SundanceIntHashSet.hpp.


Constructor & Destructor Documentation

Definition at line 50 of file SundanceIntHashSet.cpp.


Member Function Documentation

bool IntHashSet::contains ( int  x) const

Definition at line 65 of file SundanceIntHashSet.cpp.

References data_, and hashFunc().

void IntHashSet::fillArray ( int *  a) const

Definition at line 76 of file SundanceIntHashSet.cpp.

References data_.

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

Definition at line 91 of file SundanceIntHashSet.hpp.

References capacity_, and seed().

Referenced by contains(), and put().

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

Definition at line 68 of file SundanceIntHashSet.hpp.

References data_, hashFunc(), and size_.

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

Definition at line 93 of file SundanceIntHashSet.hpp.

Referenced by hashFunc().

void IntHashSet::setCapacity ( int  capacity)

Definition at line 56 of file SundanceIntHashSet.cpp.

References capacity_, and data_.

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

Definition at line 84 of file SundanceIntHashSet.hpp.

References size_.


Member Data Documentation

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

Definition at line 94 of file SundanceIntHashSet.hpp.

Referenced by hashFunc(), and setCapacity().

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

Definition at line 95 of file SundanceIntHashSet.hpp.

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

Definition at line 96 of file SundanceIntHashSet.hpp.

Referenced by put(), and size().

Site Contact