Go to the documentation of this file.
77 template<
class T>
class MinMax;
84 template<
class Key=word,
class Hash=
string::hash>
92 template<
class InputIter>
93 inline label assignMany
148 HashSet(std::initializer_list<Key> list);
164 template<
class AnyType,
class AnyHash>
172 bool test(
const Key& key)
const
183 bool insert(
const Key& key)
189 bool set(
const Key& key)
196 bool unset(
const Key& key)
206 template<
class InputIter>
207 inline label insert(InputIter first, InputIter last);
211 inline label insert(std::initializer_list<Key> list);
228 template<
class InputIter>
229 inline label set(InputIter first, InputIter last)
231 return insert(first, last);
235 inline label set(std::initializer_list<Key> list)
262 template<
class InputIter>
265 return insert(first, last);
270 template<
class InputIter>
271 inline label unset(InputIter first, InputIter last);
275 inline label unset(std::initializer_list<Key> list);
322 using parent_type::operator=;
357 void operator=(std::initializer_list<Key> rhs);
384 template<
class UnaryPredicate>
388 template<
class BinaryPredicate>
392 template<
class UnaryPredicate>
396 template<
class BinaryPredicate>
400 template<
class UnaryPredicate>
404 template<
class BinaryPredicate>
436 template<
class Key,
class Hash>
441 template<
class Key,
class Hash>
450 template<
class Key,
class Hash>
459 template<
class Key,
class Hash>
label size() const noexcept
The number of elements in table.
label set(const IndirectListBase< Key, Addr > &list)
Same as insert (no value to overwrite)
void operator=(this_type &&rhs)
Move assignment.
HashSet()
Construct null with default (128) table capacity.
HashTable< zero::null, Key, Hash > parent_type
The template instance used for the parent HashTable.
Ostream & writeList(Ostream &os, const label shortLen=0) const
HashSet(const this_type &hs)
Copy construct.
label set(const UList< Key > &list)
Same as insert (no value to overwrite)
void operator=(const this_type &rhs)
Copy assignment.
bool operator()(const Key &key) const
Return true if the entry exists, same as found()
key_iterator_base< iterator > key_iterator
Forward iterator returning the key.
bool emplace(const Key &key, Args &&... args)
Emplace insert a new entry, not overwriting existing entries.
List< Key > tocValues(const UnaryPredicate &, const bool)=delete
Not applicable for HashSet.
label set(const FixedList< Key, N > &list)
Same as insert (no value to overwrite)
bool operator==(const this_type &rhs) const
A HashTable with keys but without contents that is similar to std::unordered_set.
void operator=(const this_type &rhs)
Copy assign.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
label setMany(InputIter first, InputIter last)
Same as insert (no value to overwrite)
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.
bool operator!=(const this_type &rhs) const
The opposite of the equality operation.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label filterValues(const UnaryPredicate &, const bool)=delete
Not applicable for HashSet.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool erase(const iterator &iter)
Erase an entry specified by given iterator.
key_iterator_base< const_iterator > const_key_iterator
Forward const iterator returning the key.
label countEntries(const BinaryPredicate &, const bool)=delete
Not applicable for HashSet.
HashSet(this_type &&hs)
Move construct.
HashSet< Key, Hash > this_type
The template instance used for this HashSet.
this_type & operator&=(const this_type &rhs)
Only retain entries found in both HashSets.
label set(InputIter first, InputIter last)
Same as insert (no value to overwrite)
List< Key > tocEntries(const BinaryPredicate &, const bool)=delete
Not applicable for HashSet.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
bool unset(const Key &key)
Unset the specified key - same as erase.
label countValues(const UnaryPredicate &, const bool)=delete
Not applicable for HashSet.
HashSet(const label size)
Construct given initial table capacity.
this_type & operator-=(const this_type &rhs)
Remove entries from this HashSet.
label set(std::initializer_list< Key > list)
Same as insert (no value to overwrite)
Ostream & writeKeys(Ostream &os, const label shortLen=0) const
HashSet(Istream &is)
Construct from Istream with default table capacity.
label filterEntries(const BinaryPredicate &, const bool)=delete
Not applicable for HashSet.
A HashTable similar to std::unordered_map.
bool operator[](const Key &key) const
Return true if the entry exists, same as found().
this_type & operator^=(const this_type &rhs)
Only retain unique entries (xor)
this_type & operator+=(const this_type &rhs)
Add entries to this HashSet.
const_iterator cbegin() const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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...
const const_iterator & cend() const
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.
HashSet< word > wordHashSet
A HashSet with word keys.
bool test(const Key &key) const
Same as found() - return true if key exists in the set.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool found(const Key &key) const
Return true if hashed entry is found in table.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
A min/max value pair with additional methods. In addition to conveniently storing values,...
Ostream & operator<<(Ostream &, const boundaryPatch &)
bool set(const Key &key)
Same as insert (no value to overwrite)