HashSet<T, H, C> Class

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 .

Template Parameters

T
H Hasher<T>
C EqualTo<T>

Constraint

T  is  Semiregular  and  HashFunction <H , Tand  C  is  Relation  and  C .Domain is  T

Member Functions

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)

Typedefs

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

Member Variables

private Hashtable<T, T, Identity<T>, H, C> table

Member Function Details

Begin Member Function

public inline nothrow HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> Begin()

Definition
Line 24 of System.Base/HashSet.cm


Begin Member Function

public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> Begin()

Definition
Line 28 of System.Base/HashSet.cm


CBegin Member Function

public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> CBegin()

Definition
Line 32 of System.Base/HashSet.cm


CEnd Member Function

public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> CEnd()

Definition
Line 44 of System.Base/HashSet.cm


CFind Member Function

public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> CFind(const T& key)

Definition
Line 68 of System.Base/HashSet.cm


Clear Member Function

public inline nothrow void Clear()

Definition
Line 56 of System.Base/HashSet.cm


Count Member Function

public inline nothrow long Count()

Definition
Line 48 of System.Base/HashSet.cm


End Member Function

public inline nothrow HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> End()

Definition
Line 36 of System.Base/HashSet.cm


End Member Function

public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> End()

Definition
Line 40 of System.Base/HashSet.cm


Find Member Function

public inline nothrow HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> Find(const T& key)

Definition
Line 60 of System.Base/HashSet.cm


Find Member Function

public inline nothrow HashtableIterator<T, const T&, const T*, Hashtable<T, T, Identity<T>, H, C>> Find(const T& key)

Definition
Line 64 of System.Base/HashSet.cm


Insert Member Function

public inline Pair<HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>>, bool> Insert(const T& value)

Definition
Line 72 of System.Base/HashSet.cm


IsEmpty Member Function

public inline nothrow bool IsEmpty()

Definition
Line 52 of System.Base/HashSet.cm


Remove Member Function

public inline nothrow void Remove(HashtableIterator<T, T&, T*, Hashtable<T, T, Identity<T>, H, C>> pos)

Definition
Line 80 of System.Base/HashSet.cm


Remove Member Function

public inline nothrow void Remove(const T& key)

Definition
Line 76 of System.Base/HashSet.cm