59 template<
class Key=word,
class Hash=
string::hash>
89 template<
unsigned Size>
100 template<
class AnyType,
class AnyHash>
104 HashSet(std::initializer_list<Key>);
110 bool insert(
const Key& key)
124 bool set(
const Key& key)
136 bool unset(
const Key& key)
184 template<
class Key,
class Hash>
193 template<
class Key,
class Hash>
202 template<
class Key,
class Hash>
scalar hs(const scalar p, const scalar T) const
A 1D vector of objects of type <T> with a fixed size <Size>.
A HashTable with keys but without contents.
void operator-=(const HashSet< Key, Hash > &)
Remove entries listed in the given HashSet from this HashSet.
bool operator[](const Key &) const
Return true if the entry exists, same as found()
void operator=(const HashSet< Key, Hash > &)
Assignment operator.
HashTable< nil, Key, Hash >::iterator iterator
bool insert(const Key &key)
Insert a new entry.
bool operator!=(const HashSet< Key, Hash > &) const
The opposite of the equality operation.
void operator^=(const HashSet< Key, Hash > &)
Only retain unique entries (xor)
HashTable< nil, Key, Hash >::const_iterator const_iterator
bool unset(const Key &key)
Unset the specified key - same as erase.
bool operator==(const HashSet< Key, Hash > &) const
Equality. Two hashtables are equal when their contents are equal.
void operator|=(const HashSet< Key, Hash > &)
Combine entries from HashSets.
void operator+=(const HashSet< Key, Hash > &rhs)
Add entries listed in the given HashSet to this HashSet.
HashSet(const label size=128)
Construct given initial size.
void operator&=(const HashSet< Key, Hash > &)
Only retain entries found in both HashSets.
bool set(const Key &key)
Same as insert (cannot overwrite nil content)
An STL-conforming const_iterator.
An STL-conforming iterator.
An STL-conforming hash table.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
label size() const
Return number of elements in table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
Hash function class for primitives. All non-primitives used to hash entries on hash tables likely nee...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A zero-sized class without any storage. Used, for example, in HashSet.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
HashSet wordHashSet
A HashSet with word keys.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.