Lolly 1.4.28
|
The hashset_rep class represents an entry in a hash set. More...
#include <hashset.hpp>
Public Member Functions | |
hashset_rep () | |
Construct a new hashset_rep object with default values. | |
hashset_rep (int n2, int max2=1) | |
Construct a new hashset_rep object with specified values. | |
~hashset_rep () | |
Destroy the hashset_rep object. | |
bool | contains (T x) |
void | resize (int n) |
void | insert (T x) |
void | remove (T x) |
Private Attributes | |
int | size |
int | n |
int | max |
list< T > * | a |
Private Attributes inherited from concrete_struct | |
int | ref_count |
The reference count for the concrete object. | |
Friends | |
class | hashset< T > |
class | hashset_iterator_rep< T > |
int N | LESSGTR (hashset< T > h) |
tm_ostream & | operator<<LESSGTR (tm_ostream &out, hashset< T > h) |
bool | operator<=LESSGTR (hashset< T > h1, hashset< T > h2) |
hashset< T > copy | LESSGTR (hashset< T > h) |
Additional Inherited Members | |
Private Member Functions inherited from concrete_struct | |
concrete_struct () | |
Default constructor for the concrete object. Increments the reference count. | |
virtual | ~concrete_struct () |
Virtual destructor for the concrete object. Decrements the reference count. | |
The hashset_rep class represents an entry in a hash set.
T | The type of the data stored in the hash set. |
Definition at line 26 of file hashset.hpp.
|
inline |
|
inline |
Construct a new hashset_rep object with specified values.
n2 | The number of keys (a power of two). |
max2 | The mean number of entries per key. |
Definition at line 46 of file hashset.hpp.
|
inline |
bool hashset_rep< T >::contains | ( | T | x | ) |
Definition at line 47 of file hashset.ipp.
void hashset_rep< T >::resize | ( | int | n | ) |
Definition at line 18 of file hashset.ipp.
void hashset_rep< T >::insert | ( | T | x | ) |
void hashset_rep< T >::remove | ( | T | x | ) |
|
friend |
Definition at line 63 of file hashset.hpp.
|
friend |
|
private |
The size of the hash set (number of entries).
Definition at line 27 of file hashset.hpp.
|
private |
The number of keys (a power of two).
Definition at line 28 of file hashset.hpp.
|
private |
The mean number of entries per key.
Definition at line 29 of file hashset.hpp.
|
private |
The array of entries.
Definition at line 30 of file hashset.hpp.