37template<
class Key,
class Hash>
38template<
class InputIter>
39inline Foam::label Foam::HashSet<Key, Hash>::assignMany
49 return insert(first, last);
55template<
class Key,
class Hash>
65template<
class Key,
class Hash>
68 parent_type(2*list.size())
74template<
class Key,
class Hash>
84template<
class Key,
class Hash>
87 parent_type(2*list.size())
89 insert(list.begin(), list.end());
93template<
class Key,
class Hash>
94template<
class AnyType,
class AnyHash>
100 parent_type(2*tbl.size())
102 for (
auto iter = tbl.
cbegin(); iter != tbl.
cend(); ++iter)
104 this->insert(iter.key());
111template<
class Key,
class Hash>
112template<
class InputIter>
120 while (first != last)
132template<
class Key,
class Hash>
135 std::initializer_list<Key> list
138 return insert(list.begin(), list.end());
142template<
class Key,
class Hash>
149 return insert(list.begin(), list.end());
153template<
class Key,
class Hash>
163template<
class Key,
class Hash>
174template<
class Key,
class Hash>
175template<
class InputIter>
186template<
class Key,
class Hash>
189 std::initializer_list<Key> list
192 return unset(list.begin(), list.end());
196template<
class Key,
class Hash>
203 return unset(list.begin(), list.end());
207template<
class Key,
class Hash>
217template<
class Key,
class Hash>
224 return unset(list.begin(), list.end());
228template<
class Key,
class Hash>
235template<
class Key,
class Hash>
244template<
class Key,
class Hash>
251template<
class Key,
class Hash>
258template<
class Key,
class Hash>
262 assignMany(
rhs.size(),
rhs.begin(),
rhs.end());
266template<
class Key,
class Hash>
269 assignMany(
rhs.size(),
rhs.begin(),
rhs.end());
273template<
class Key,
class Hash>
276 assignMany(
rhs.size(),
rhs.begin(),
rhs.end());
280template<
class Key,
class Hash>
288 else if (this->size() !=
rhs.size())
295 if (!this->contains(iter.key()))
305template<
class Key,
class Hash>
312template<
class Key,
class Hash>
329template<
class Key,
class Hash>
338template<
class Key,
class Hash>
345 if (this->contains(iter.key()))
347 this->
erase(iter.key());
359template<
class Key,
class Hash>
367template<
class Key,
class Hash>
371 this->parent_type::erase(
rhs);
379template<
class Key,
class Hash>
388template<
class Key,
class Hash>
389Foam::HashSet<Key, Hash> Foam::operator|
401template<
class Key,
class Hash>
410 for (
const Key&
k : a)
422template<
class Key,
class Hash>
423Foam::HashSet<Key, Hash> Foam::operator^
435template<
class Key,
class Hash>
444 for (
const Key&
k : a)
458template<
class Key,
class Hash>
469template<
class Key,
class Hash>
480template<
class Key,
class Hash>
491template<
class Key,
class Hash>
499template<
class Key,
class Hash>
507template<
class Key,
class Hash>
A 1D vector of objects of type <T> with a fixed length <N>.
iterator end() noexcept
Return an iterator to end traversing the FixedList.
iterator begin() noexcept
Return an iterator to begin traversing the FixedList.
A HashTable with keys but without contents that is similar to std::unordered_set.
bool operator[](const Key &key) const noexcept
Return true if the entry exists, same as contains().
bool operator()(const Key &key) const noexcept
Return true if the entry exists, same as contains().
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
this_type & operator|=(const this_type &rhs)
Add entries to this HashSet.
constexpr HashSet() noexcept=default
Default construct: empty without allocation (capacity=0).
typename parent_type::key_iterator iterator
An iterator, returning reference to the key.
bool operator==(const this_type &rhs) const
Sets are equal if all keys are equal, independent of order or underlying storage size.
typename parent_type::const_key_iterator const_iterator
A const_iterator, returning reference to the key.
bool unset(const Key &key)
Unset the specified key - same as erase.
const_iterator cbegin() const
constexpr const_iterator cend() const noexcept
this_type & operator-=(const this_type &rhs)
Remove entries from this HashSet. Uses erase().
this_type & operator&=(const this_type &rhs)
Only retain entries contained in both HashSets.
this_type & operator^=(const this_type &rhs)
Only retain unique entries (xor).
void operator=(const this_type &rhs)
Copy assign.
void merge(HashSet< Key, Hash > &source)
Attempts to extract entries from source parameter and insert them into this, does not overwrite exist...
bool operator!=(const this_type &rhs) const
The opposite of the equality operation.
HashTable< Foam::zero, Key, Hash > parent_type
The template instance used for the parent HashTable.
this_type & operator+=(const this_type &rhs)
Add entries to this HashSet. Same as the '|=' operator.
A HashTable similar to std::unordered_map.
label retain(const HashTable< AnyType, Key, AnyHash > &other)
bool contains(const Key &key) const
True if hashed key is contained (found) in table.
const_iterator cbegin() const
const_iterator set to the beginning of the HashTable
void merge(HashTable< Foam::zero, Key, Hash > &source)
label capacity() const noexcept
The size of the underlying table (the number of buckets).
label size() const noexcept
The number of elements in table.
bool erase(const iterator &iter)
Erase an entry specified by given iterator.
constexpr const_iterator cend() const noexcept
const_iterator to signal the end (for any HashTable)
constexpr HashTable() noexcept
Default construct: empty without allocation (capacity=0).
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
iterator end()
Return an iterator at end of list.
iterator begin()
Return an iterator at begin of list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
iterator begin() noexcept
Return an iterator to begin traversing the UList.
iterator end() noexcept
Return an iterator to end traversing the UList.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
triangles reserve(surf.size())
nonInt insert("surfaceSum(((S|magSf)*S)")
Number of items before requiring line-breaks in the list output.