|
| HashSet () |
| Construct empty.
|
|
| HashSet (const HashSet< T > &set) |
| Construct from another hash set.
|
|
| HashSet (HashSet< T > &&set) noexcept |
| Move-construct from another hash set.
|
|
| HashSet (const std::initializer_list< T > &list) |
| Aggregate initialization constructor.
|
|
| ~HashSet () |
| Destruct.
|
|
HashSet & | operator= (const HashSet< T > &rhs) |
| Assign a hash set.
|
|
HashSet & | operator= (HashSet< T > &&rhs) noexcept |
| Move-assign a hash set.
|
|
HashSet & | operator+= (const T &rhs) |
| Add-assign a value.
|
|
HashSet & | operator+= (const HashSet< T > &rhs) |
| Add-assign a hash set.
|
|
bool | operator== (const HashSet< T > &rhs) const |
| Test for equality with another hash set.
|
|
bool | operator!= (const HashSet< T > &rhs) const |
| Test for inequality with another hash set.
|
|
Iterator | Insert (const T &key) |
| Insert a key. Return an iterator to it.
|
|
Iterator | Insert (const T &key, bool &exists) |
| Insert a key. Return an iterator and set exists flag according to whether the key already existed.
|
|
void | Insert (const HashSet< T > &set) |
| Insert a set.
|
|
Iterator | Insert (const ConstIterator &it) |
| Insert a key by iterator. Return iterator to the value.
|
|
bool | Erase (const T &key) |
| Erase a key. Return true if was found.
|
|
Iterator | Erase (const Iterator &it) |
| Erase a key by iterator. Return iterator to the next key.
|
|
void | Clear () |
| Clear the set.
|
|
void | Sort () |
| Sort keys. After sorting the set can be iterated in order until new elements are inserted.
|
|
bool | Rehash (unsigned numBuckets) |
| Rehash to a specific bucket count, which must be a power of two. Return true if successful.
|
|
Iterator | Find (const T &key) |
| Return iterator to the key, or end iterator if not found.
|
|
ConstIterator | Find (const T &key) const |
| Return const iterator to the key, or end iterator if not found.
|
|
bool | Contains (const T &key) const |
| Return whether contains a key.
|
|
Iterator | Begin () |
| Return iterator to the beginning.
|
|
ConstIterator | Begin () const |
| Return iterator to the beginning.
|
|
Iterator | End () |
| Return iterator to the end.
|
|
ConstIterator | End () const |
| Return iterator to the end.
|
|
const T & | Front () const |
| Return first key.
|
|
const T & | Back () const |
| Return last key.
|
|
| HashBase () |
| Construct.
|
|
void | Swap (HashBase &rhs) |
| Swap with another hash set or map.
|
|
unsigned | Size () const |
| Return number of elements.
|
|
unsigned | NumBuckets () const |
| Return number of buckets.
|
|
bool | IsEmpty () const |
| Return whether has no elements.
|
|
|
Node * | Head () const |
| Return the head node.
|
|
Node * | Tail () const |
| Return the tail node.
|
|
Node * | FindNode (const T &key, unsigned hashKey) const |
| Find a node from the buckets. Do not call if the buckets have not been allocated.
|
|
Node * | FindNode (const T &key, unsigned hashKey, Node *&previous) const |
| Find a node and the previous node from the buckets. Do not call if the buckets have not been allocated.
|
|
Node * | InsertNode (Node *dest, const T &key) |
| Insert a node into the list. Return the new node.
|
|
Node * | EraseNode (Node *node) |
| Erase a node from the list. Return pointer to the next element, or to the end if could not erase.
|
|
Node * | ReserveNode () |
| Reserve a node.
|
|
Node * | ReserveNode (const T &key) |
| Reserve a node with specified key.
|
|
void | FreeNode (Node *node) |
| Free a node.
|
|
void | Rehash () |
| Rehash the buckets.
|
|
unsigned | Hash (const T &key) const |
| Compute a hash based on the key and the bucket size.
|
|