A collection of unique elements that are organized in a Hashtable .
The elements need not be ordered, but you must be able to compare them for equality ( EqualTo ) or other equality-like relation provided as the third template argument.
The second template argument is a hash function object that is by default the Hasher function object that delegates the computation of the hash function for the element to one of the GetHashCode function overloads. If there is not a GetHashCode overload for the your element type, you can provide your own, and it should work with the standard Hasher .
Adding an element to the hash set depends on the hash function, but can be thought as O(1) operation. Searching for an element in a hash set depends on the hash function, but can be thought as O(1) operation.
Model of ForwardContainer .
T | |
H | Hasher<T> |
C | EqualTo<T> |
public inline nothrow HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> | Begin() |
public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> | Begin() const |
public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> | CBegin() const |
public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> | CEnd() const |
public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> | CFind(const T& key) const |
public inline nothrow void | Clear() |
public inline nothrow long | Count() const |
public inline nothrow HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> | End() |
public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> | End() const |
public inline nothrow HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> | Find(const T& key) |
public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> | Find(const T& key) const |
public inline Pair<HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>>, bool> | Insert(const T& value) |
public inline nothrow bool | IsEmpty() const |
public inline nothrow void | Remove(HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> pos) |
public inline nothrow void | Remove(const T& key) |
public typedef Compare | C |
public typedef ConstIterator | HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> |
public typedef HashFun | H |
public typedef Iterator | HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> |
public typedef KeyType | T |
private typedef Self | HashSet |
private typedef TableType | Hashtable<T, T, Identity<T>, H, C> |
public typedef ValueType | T |
private Hashtable<T, T, Identity<T>, H, C> | table |