33#include <NDEVR/BaseValues.h>
34#include <NDEVR/LibAssert.h>
35#include <NDEVR/Buffer.h>
36#define NDEVR_USE_ROBIN_MAP 1
37#if NDEVR_USE_ROBIN_MAP
38#include "tsl/robin_set.h"
39#define SET_BASE tsl::robin_set
42#define SET_BASE std::set
46 template<
class t_value>
47 class Set :
public SET_BASE<t_value>
53 template<
class t_iter>
54 Set(
const t_iter& begin,
const t_iter& end)
55 : SET_BASE<t_value>(begin, end)
57 template<
class t_type,
class t_index_type,
class t_memory_allocator,
class t_memory_manager>
61 [[nodiscard]]
bool hasValue(
const t_value& key)
const
63 return SET_BASE<t_value>::find(key) != SET_BASE<t_value>::end();
65 void add(
const t_value& key)
67 SET_BASE<t_value>::insert(key);
69 void add(t_value&& key)
71 SET_BASE<t_value>::insert(std::move(key));
77 for (
const auto& kv : (*
this))
84 for (
const auto& location : *
this)
86 if (location.first == key)
Definition Pointer.hpp:297
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
bool hasValue(const t_value &key) const
Definition Set.h:61
void add(const t_value &key)
Definition Set.h:65
uint04 size() const
Definition Set.h:92
Buffer< t_value, t_index_type, t_memory_allocator, t_memory_manager > values() const
Definition Set.h:74
uint04 indexOf(const t_value &key) const
Definition Set.h:81
Set(const Buffer< t_type, t_index_type, t_memory_allocator, t_memory_manager > &values)
Definition Set.h:58
Set(const t_iter &begin, const t_iter &end)
Definition Set.h:54
void add(t_value &&key)
Definition Set.h:69
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
Definition BaseValues.hpp:272