template<typename TypeT, typename CompareT = less<TypeT>, class AllocT = allocator<pair<TypeT, bool>>>
struct fennec::sequence< TypeT, CompareT, AllocT >
This data-structure behaves like an ordered-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(\log N)\) |
| find | \(O(\log N)\) |
| insertion | \(O(\log N)\) |
| deletion | \(O(\log N)\) |
- Template Parameters
-
| TypeT | The type to contain |
| CompareT | Function for comparing two values |
| AllocT | An allocator class |
|
| constexpr iterator | begin () |
| |
| constexpr iterator | end () |
| |
|
|
constexpr | sequence () |
| | Default Constructor, initializes an empty sequence.
|
| |
|
constexpr | sequence (sequence &&) noexcept=default |
| | Move Constructor, takes ownership of a sequence.
|
| |
|
constexpr | sequence (const sequence &)=default |
| | Copy Constructor, copies a sequence.
|
| |
|
constexpr | ~sequence () |
| | Default Destructor, destructs elements in-order
|
| |
|
| constexpr iterator | find (const value_t &val) |
| | Value Find Function, finds the iterator position for val, otherwise returns end()
|
| |
| bool | contains (const value_t &val) |
| | Value Contains Function, checks if the sequence contains a value.
|
| |
|
| constexpr size_t | size () const |
| |
| constexpr bool | empty () const |
| |
|
| constexpr void | insert (value_t &&val) |
| | Move Insertion, moves val into the sequence.
|
| |
| constexpr void | insert (const value_t &val) |
| | Copy Insertion, inserts a copy of val into the sequence.
|
| |
| template<typename... ArgsT> |
| constexpr void | emplace (ArgsT &&...args) |
| | Emplacement, constructs and adds a value into the sequence.
|
| |
|
constexpr void | clear () |
| | Destructs all elements, in-order, contained in the sequence.
|
| |