|
Jlm
|
#include <HashSet.hpp>
Classes | |
| class | ItemConstIterator |
Public Member Functions | |
| ~HashSet () noexcept=default | |
| HashSet ()=default | |
| template<class InputIt > | |
| HashSet (InputIt begin, InputIt end) | |
| HashSet (const HashSet &other) | |
| HashSet (HashSet &&other) noexcept | |
| HashSet (std::initializer_list< ItemType > initializerList) | |
| template<typename OtherHashFunctor > | |
| HashSet (const std::unordered_set< ItemType, OtherHashFunctor > &other) | |
| HashSet & | operator= (const HashSet &other) |
| HashSet & | operator= (HashSet &&other) noexcept |
| void | Clear () noexcept |
| bool | Contains (const ItemType &item) const noexcept |
| bool | IsSubsetOf (const HashSet< ItemType > &other) const noexcept |
| std::size_t | Size () const noexcept |
| bool | IsEmpty () const noexcept |
| bool | insert (ItemType item) |
| IteratorRange< ItemConstIterator > | Items () const noexcept |
| bool | UnionWith (const HashSet< ItemType > &other) |
| bool | UnionWithAndClear (HashSet< ItemType > &other) |
| void | IntersectWith (const HashSet< ItemType > &other) |
| void | IntersectWithAndClear (HashSet< ItemType > &other) |
| void | DifferenceWith (const HashSet< ItemType > &other) |
| bool | Remove (ItemType item) |
| template<typename F > | |
| size_t | RemoveWhere (const F &match) |
| ItemConstIterator | Erase (ItemConstIterator iterator) |
| bool | operator== (const HashSet< ItemType > &other) const noexcept |
| bool | operator!= (const HashSet< ItemType > &other) const noexcept |
Private Types | |
| using | InternalSet = std::unordered_set< ItemType, HashFunctor > |
Private Attributes | |
| InternalSet | Set_ |
Represents a set of values. A set is a collection that contains no duplicate elements, and whose elements are in no particular order.
| ItemType | The type of the items in the hash set. |
Definition at line 23 of file HashSet.hpp.
|
private |
Definition at line 25 of file HashSet.hpp.
|
defaultnoexcept |
|
default |
|
inline |
Definition at line 99 of file HashSet.hpp.
|
inline |
Definition at line 103 of file HashSet.hpp.
|
inlinenoexcept |
Definition at line 107 of file HashSet.hpp.
|
inline |
Definition at line 111 of file HashSet.hpp.
|
inlineexplicit |
Definition at line 116 of file HashSet.hpp.
|
inlinenoexcept |
Removes all items from a HashSet object.
Definition at line 138 of file HashSet.hpp.
|
inlinenoexcept |
Determines whether an HashSet object contains the specified item.
| item | The item to locate in the HashSet object. |
item, otherwise false. Definition at line 150 of file HashSet.hpp.
|
inline |
Modifies this HashSet object by removing any elements that are present in other.
| other | the HashSet used as the negative side of the set difference. |
Definition at line 302 of file HashSet.hpp.
|
inline |
Removes the element pointed to by the given iterator
| iterator | the element to remove |
Definition at line 373 of file HashSet.hpp.
|
inline |
Inserts the specified item to a set.
| item | The item to add. |
item is added to the HashSet object. False if item is already present. Definition at line 210 of file HashSet.hpp.
|
inline |
Modifies this HashSet object to contain only elements that are present in itself and other.
| other | A HashSet to intersect with. |
Definition at line 269 of file HashSet.hpp.
|
inline |
Modifies this HashSet object to contain only elements both in itself and other. Consumes other, making it empty.
| other | the HashSet to be consumed |
Definition at line 286 of file HashSet.hpp.
|
inlinenoexcept |
Determines whether the set is empty.
Definition at line 198 of file HashSet.hpp.
|
inlinenoexcept |
Determines whether a HashSet object is a subset of other.
| other | The HashSet to compare to the collection. |
other or equal to other, otherwise false. Definition at line 163 of file HashSet.hpp.
|
inlinenoexcept |
Get a iterator_range for iterating through the items in the HashSet.
Definition at line 223 of file HashSet.hpp.
|
inlinenoexcept |
Compares the items of this HashSet object with the items of other for inequality.
| other | HashSet object the items are compared with. |
other are unequal the items of this HashSet object. Definition at line 404 of file HashSet.hpp.
|
inline |
Definition at line 121 of file HashSet.hpp.
|
inlinenoexcept |
Definition at line 128 of file HashSet.hpp.
|
inlinenoexcept |
Compares the items of this HashSet object with the items of other for equality.
| other | HashSet object the items are compared with. |
other equal the items of this HashSet object. Definition at line 385 of file HashSet.hpp.
|
inline |
Removes the specified item from a HashSet object.
| item | The item to remove. |
item is successfully found and removed. False if item is not found. Definition at line 332 of file HashSet.hpp.
|
inline |
Removes all elements that match the conditions defined by the specified match from a HashSet object.
| F | A type supporting function call operator: bool operator(const ItemType&) |
| match | Defines the condition of the elements to remove. |
Definition at line 347 of file HashSet.hpp.
|
inlinenoexcept |
Get the number of items contained in the set.
Definition at line 187 of file HashSet.hpp.
|
inline |
Modifies this HashSet object to contain all elements that are present in itself, other, or both.
| other | A HashSet to union with. |
Definition at line 236 of file HashSet.hpp.
|
inline |
Modifies this HashSet object to contain all elements in either itself, other, or both. Consumes other, making it empty.
| other | the HashSet to be consumed |
Definition at line 252 of file HashSet.hpp.
|
private |
Definition at line 410 of file HashSet.hpp.