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_ |
Definition at line 58 of file SundanceIntHashSet.hpp.
Definition at line 50 of file SundanceIntHashSet.cpp.
| 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.
| int Sundance::IntHashSet::size | ( | ) | const [inline] |
Definition at line 84 of file SundanceIntHashSet.hpp.
References size_.
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().
int Sundance::IntHashSet::size_ [private] |
Definition at line 96 of file SundanceIntHashSet.hpp.