33 template<
class Key,
class Hash>
45 template<
class Key,
class Hash>
46 template<
unsigned Size>
58 template<
class Key,
class Hash>
59 template<
class AnyType,
class AnyHash>
80 template<
class Key,
class Hash>
83 std::initializer_list<Key> lst
88 for (
const Key& key : lst)
97 template<
class Key,
class Hash>
113 template<
class Key,
class Hash>
119 if (this->
insert(iter.key()))
131 template<
class Key,
class Hash>
134 return this->
found(key);
138 template<
class Key,
class Hash>
145 <<
"attempted assignment to self"
153 template<
class Key,
class Hash>
160 <<
"attempted assignment to self"
168 template<
class Key,
class Hash>
172 for (
const_iterator iter = this->cbegin(); iter != this->cend(); ++iter)
174 if (!rhs.
found(iter.key()))
181 for (const_iterator iter = rhs.
cbegin(); iter != rhs.
cend(); ++iter)
183 if (!this->
found(iter.key()))
193 template<
class Key,
class Hash>
200 template<
class Key,
class Hash>
211 template<
class Key,
class Hash>
215 for (
iterator iter = this->begin(); iter != this->end(); ++iter)
217 if (!rhs.
found(iter.key()))
225 template<
class Key,
class Hash>
231 if (this->
found(iter.key()))
233 this->
erase(iter.key());
243 template<
class Key,
class Hash>
249 this->
erase(iter.key());
256 template<
class Key,
class Hash>
270 template<
class Key,
class Hash>
274 const HashSet<Key, Hash>& hash1,
275 const HashSet<Key, Hash>& hash2
278 HashSet<Key, Hash> out(hash1);
284 template<
class Key,
class Hash>
288 const HashSet<Key, Hash>& hash1,
289 const HashSet<Key, Hash>& hash2
292 HashSet<Key, Hash> out(hash1);
#define forAll(list, i)
Loop across all elements in list.
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.
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)
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.
HashSet(const label size=128)
Construct given initial size.
void operator&=(const HashSet< Key, Hash > &)
Only retain entries found in both HashSets.
An STL-conforming const_iterator.
An STL-conforming iterator.
An STL-conforming hash table.
const_iterator cbegin() const
const_iterator set to the beginning of the HashTable
bool found(const Key &) const
Return true if hashedEntry is found in table.
void operator=(const HashTable< T, Key, Hash > &)
Assignment operator.
Hash function class for primitives. All non-primitives used to hash entries on hash tables likely nee...
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar h
Planck constant.
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
errorManip< error > abort(error &err)
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
static iteratorEnd cend()
iteratorEnd set to beyond the end of any HashTable