template<typename TypeT, class Hash = hash<TypeT>, class Equals = equality<TypeT>, class Alloc = allocator<TypeT>>
struct fennec::set< TypeT, Hash, Equals, Alloc >
This data-structure behaves like a set, but does not use pointers, instead storing the table in-array
| Property | Value |
| stable | ⛔ |
| dynamic | ✅ |
| homogenous | ✅ |
| distinct | ✅ |
| ordered | ⛔ |
| space | \(O(N)\) |
| linear | ✅ |
| access | \(O(1)\) |
| find | \(O(1)\) |
| insertion | \(O(1)\) |
| deletion | \(O(1)\) |
- Template Parameters
-
|
|
|
constexpr | set () |
| | Default Constructor, initializes empty set.
|
| |
| constexpr | set (const hash_t &hash) |
| | Hash Copy Constructor, initializes empty set with a hash.
|
| |
| constexpr | set (const alloc_t &alloc) |
| | Alloc Copy Constructor, initializes empty set with an allocator.
|
| |
| constexpr | set (const hash_t &hash, const alloc_t &alloc) |
| | Hash Alloc Copy Constructor, initializes empty set with a hash and allocator.
|
| |
| constexpr | set (const set &set) |
| | Set Copy Constructor.
|
| |
| constexpr | set (set &&set) noexcept |
| | Set Move Constructor.
|
| |
|
constexpr | ~set () |
| | Destructor, destructs all elements and releases the allocation.
|
| |
|
| constexpr size_t | size () const |
| |
| constexpr bool | empty () const |
| |
| constexpr size_t | capacity () const |
| |
|
| constexpr iterator | find (const elem_t &val) const |
| | Find an Element.
|
| |
| constexpr bool | contains (const elem_t &val) const |
| | Check if a set contains a value.
|
| |
| constexpr elem_t * | at (const iterator &it) |
| | Iterator Access.
|
| |
| constexpr const elem_t * | at (const iterator &it) const |
| | Iterator Const Access.
|
| |
|
| constexpr iterator | insert (elem_t &&val) |
| | Move Insertion.
|
| |
| constexpr iterator | insert (const elem_t &val) |
| | Copy Insertion.
|
| |
| template<typename... ArgsT> |
| constexpr iterator | emplace (ArgsT &&...args) |
| | Emplace Insertion.
|
| |
| constexpr void | erase (iterator it) |
| | Element Erase.
|
| |
| constexpr void | erase (const elem_t &val) |
| | Element Erase.
|
| |
|
| constexpr iterator | begin () const |
| |
| constexpr iterator | end () const |
| |