Go to the documentation of this file.
37 template<
class Key,
class Hash>
38 template<
class InputIter>
46 if (!this->capacity())
56 return insert(first, last);
62 template<
class Key,
class Hash>
68 for (
const auto&
k : list)
75 template<
class Key,
class Hash>
80 for (
const auto&
k : list)
87 template<
class Key,
class Hash>
93 for (
const auto&
k : list)
100 template<
class Key,
class Hash>
105 for (
const auto&
k : list)
112 template<
class Key,
class Hash>
113 template<
class AnyType,
class AnyHash>
121 for (
auto iter = tbl.
cbegin(); iter != tbl.
cend(); ++iter)
130 template<
class Key,
class Hash>
131 template<
class InputIter>
139 for (; first != last; ++first)
150 template<
class Key,
class Hash>
153 std::initializer_list<Key> list
156 return insert(list.begin(), list.end());
160 template<
class Key,
class Hash>
171 template<
class Key,
class Hash>
181 template<
class Key,
class Hash>
192 template<
class Key,
class Hash>
193 template<
class InputIter>
204 template<
class Key,
class Hash>
207 std::initializer_list<Key> list
210 return unset(list.begin(), list.end());
214 template<
class Key,
class Hash>
221 return unset(list.
begin(), list.
end());
225 template<
class Key,
class Hash>
231 return unset(list.
begin(), list.
end());
235 template<
class Key,
class Hash>
242 return unset(list.
begin(), list.
end());
248 template<
class Key,
class Hash>
251 return this->
found(key);
255 template<
class Key,
class Hash>
258 return this->
found(key);
262 template<
class Key,
class Hash>
270 template<
class Key,
class Hash>
277 template<
class Key,
class Hash>
280 assignMany(rhs.size(), rhs.begin(), rhs.end());
284 template<
class Key,
class Hash>
288 if (this->size() != rhs.
size())
295 if (!this->
found(iter.key()))
305 template<
class Key,
class Hash>
312 template<
class Key,
class Hash>
326 template<
class Key,
class Hash>
330 this->parent_type::retain(rhs);
335 template<
class Key,
class Hash>
342 if (this->
found(iter.key()))
344 this->
erase(iter.key());
356 template<
class Key,
class Hash>
360 return this->operator|=(rhs);
364 template<
class Key,
class Hash>
376 template<
class Key,
class Hash>
385 template<
class Key,
class Hash>
388 const HashSet<Key, Hash>& hash1,
389 const HashSet<Key, Hash>& hash2
392 HashSet<Key, Hash> out(hash1);
398 template<
class Key,
class Hash>
401 const HashSet<Key, Hash>& hash1,
402 const HashSet<Key, Hash>& hash2
405 HashSet<Key, Hash> out(hash1);
411 template<
class Key,
class Hash>
414 const HashSet<Key, Hash>& hash1,
415 const HashSet<Key, Hash>& hash2
418 HashSet<Key, Hash> out(hash1);
426 template<
class Key,
class Hash>
437 template<
class Key,
class Hash>
448 template<
class Key,
class Hash>
459 template<
class Key,
class Hash>
467 template<
class Key,
class Hash>
475 template<
class Key,
class Hash>
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
label size() const noexcept
The number of elements in table.
iterator end()
Return an iterator at end of list.
HashSet()
Default construct with default (128) table capacity.
iterator begin()
Return an iterator to begin traversing the FixedList.
bool operator[](const Key &key) const noexcept
Return true if the entry exists, same as found().
void operator=(const this_type &rhs)
Copy assignment.
const_iterator cbegin() const
const_iterator set to the beginning of the HashTable
static constexpr label size() noexcept
Return the number of elements in the FixedList.
constexpr const_iterator cend() const noexcept
const_iterator to signal the end (for any HashTable)
bool operator==(const this_type &rhs) const
A HashTable with keys but without contents that is similar to std::unordered_set.
iterator begin()
Return an iterator to begin traversing the UList.
this_type & operator+=(const this_type &rhs)
Add entries to this HashSet. Same as the '|=' operator.
this_type & operator|=(const this_type &rhs)
Add entries to this HashSet.
typename parent_type::const_key_iterator const_iterator
A const_iterator, returning reference to the key.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
bool operator!=(const this_type &rhs) const
The opposite of the equality operation.
patchWriters resize(patchIds.size())
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Number of items before requiring line-breaks in the list output.
this_type & operator&=(const this_type &rhs)
Only retain entries found in both HashSets.
bool unset(const Key &key)
Unset the specified key - same as erase.
constexpr const_iterator cend() const noexcept
this_type & operator-=(const this_type &rhs)
Remove entries from this HashSet. Uses erase()
iterator begin()
Return an iterator at begin of list.
Ostream & writeKeys(Ostream &os, const label shortLen=0) const
iterator end()
Return an iterator to end traversing the FixedList.
bool operator()(const Key &key) const noexcept
Return true if the entry exists, same as found()
iterator begin()
iterator set to the beginning of the HashTable
label capacity() const noexcept
The size of the underlying table.
this_type & operator^=(const this_type &rhs)
Only retain unique entries (xor)
const_iterator cbegin() const
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label k
Boltzmann constant.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
typename parent_type::key_iterator iterator
An iterator, returning reference to the key.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
iterator end()
Return an iterator to end traversing the UList.