A hash-based key-value store, useful for quick associative lookups. Key features include:
More...
|
void | add (const t_key &key) |
|
void | add (const t_key &key, const t_value &value) |
|
void | add (t_key &&key) |
|
| Dictionary () |
|
t_value & | get (const t_key &key) |
|
const t_value & | get (const t_key &key) const |
|
const t_value & | getFromIndex (uint04 index) const |
|
bool | hasKey (const t_key &key) const |
|
uint04 | indexOf (const t_key &key) const |
|
template<class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_key>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_key, t_index_type, false>> |
Buffer< t_key, t_index_type, t_memory_allocator, t_memory_manager > | keys () const |
|
t_value & | operator[] (const t_key &key) |
|
const t_value & | operator[] (const t_key &key) const |
|
void | removeIndex (uint04 index) |
|
void | set (const t_key &key, const t_value &value) |
|
uint04 | size () const |
|
template<class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_value>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_value, t_index_type, false>> |
Buffer< t_value, t_index_type, t_memory_allocator, t_memory_manager > | values () const |
|
template<class t_key, class t_value, class t_hash = std::hash<t_key>>
class NDEVR::Dictionary< t_key, t_value, t_hash >
A hash-based key-value store, useful for quick associative lookups. Key features include:
- Uses tsl robin library as backing logic and hashmap. Proven to be significantly faster in almost all metrics over std::unordered_set on modern architecture
- Easy functions for converting to other NDEVR containers
template<class t_key , class t_value , class t_hash = std::hash<t_key>>
template<class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_key>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_key, t_index_type, false>>
Buffer< t_key, t_index_type, t_memory_allocator, t_memory_manager > keys |
( |
| ) |
const |
|
inlinenodiscard |
template<class t_key , class t_value , class t_hash = std::hash<t_key>>
template<class t_index_type = uint04, class t_memory_allocator = ObjectAllocator<ObjectInfo<t_value>::Primitive, t_index_type>, class t_memory_manager = BufferAllocator<t_value, t_index_type, false>>
Buffer< t_value, t_index_type, t_memory_allocator, t_memory_manager > values |
( |
| ) |
const |
|
inlinenodiscard |