Go to the documentation of this file.
59 template<
class Key=word,
class Hash=
string::hash>
108 template<
class AnyType,
class AnyHash>
117 bool insert(
const Key& key)
127 bool set(
const Key& key)
139 bool unset(
const Key& key)
181 template<
class Key,
class Hash>
182 HashSet<Key,Hash>
operator|
184 const HashSet<Key,Hash>& hash1,
185 const HashSet<Key,Hash>& hash2
190 template<
class Key,
class Hash>
191 HashSet<Key,Hash>
operator&
193 const HashSet<Key,Hash>& hash1,
194 const HashSet<Key,Hash>& hash2
199 template<
class Key,
class Hash>
200 HashSet<Key,Hash>
operator^
202 const HashSet<Key,Hash>& hash1,
203 const HashSet<Key,Hash>& hash2
HashSet(const Xfer< HashTable< nil, Key, Hash > > &hs)
Construct by transferring the parameter contents.
bool operator!=(const HashSet< Key, Hash > &) const
The opposite of the equality operation.
void operator-=(const HashSet< Key, Hash > &)
Remove entries listed in the given HashSet from this HashSet.
An STL-conforming iterator.
void operator^=(const HashSet< Key, Hash > &)
Only retain unique entries (xor)
An STL-conforming const_iterator.
bool operator[](const Key &) const
Return true if the entry exists, same as found()
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
HashSet(const Xfer< HashSet< Key, Hash > > &hs)
Construct by transferring the parameter contents.
A zero-sized class without any storage. Used, for example, in HashSet.
A HashTable with keys but without contents.
A simple container for copying or transferring objects of type <T>.
Hash function class for primitives. All non-primitives used to hash entries on hash tables likely nee...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
HashSet(const HashSet< Key, Hash > &hs)
Construct as copy.
void operator&=(const HashSet< Key, Hash > &)
Only retain entries found in both HashSets.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
void operator+=(const HashSet< Key, Hash > &rhs)
Add entries listed in the given HashSet to this HashSet.
bool unset(const Key &key)
Unset the specified key - same as erase.
void operator|=(const HashSet< Key, Hash > &)
Combine entries from HashSets.
HashTable< nil, Key, Hash >::const_iterator const_iterator
HashTable< nil, Key, Hash >::iterator iterator
label size() const
Return number of elements in table.
label set(const UList< Key > &lst)
Same as insert (cannot overwrite nil content)
HashSet(Istream &is)
Construct from Istream.
An STL-conforming hash table.
bool operator==(const HashSet< Key, Hash > &) const
Equality. Two hashtables are equal when their contents are equal.
HashSet(const label size=128)
Construct given initial size.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool insert(const Key &key)
Insert a new entry.
HashSet wordHashSet
A HashSet with word keys.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
bool set(const Key &key)
Same as insert (cannot overwrite nil content)