This file defines the hash_list container. More...
#include <list>
#include <vector>
#include <utility>
#include <cxxtls/hashers.h>
Go to the source code of this file.
Classes | |
class | hash_list< Key, Value, Hash > |
A hash_list<Key,Value,Hash> is a list of pair<Key,Value> which can be quickly searched for a given K. Most operations are of fixed cost. Memory consumed is approximately 3 * sizeof(void*) + sizeof(K) + sizeof(V). The primary storage mechanism is a list of Key,Value,bucket_next objects. This gives O(1) insert, erase, iteration, etc. The 'bucket_next' member kept with the Key,Value pair lets us have a fixed time cost to find a given K -- there is a hash table containing all Keys -- this table's buckets thread through the individual objects stored in the linked list. More... | |
struct | index_helper |
When using a non-const hash_list, and invoking the array index operator, [], you get back an index_helper object rather than a reference to the Value object you would expect to be gettting. This is because the behaviour of the array index operation requires that if the object isn't there already that it be inserted. You could insert a 'default' Value object into the container, only to have it deleted if you are writing code like this: More... | |
struct | value_type |
The objects actually stored in a hash_list are 'value_type' objects. The member, data_, contains the pair<Key,Value> that is the user data provided by an insert operation. More... | |
Namespaces | |
namespace | cxxtls |
The namespace that encapsulates most of the functionality in the CXX toolkit. |
This file defines the hash_list container.
Definition in file hash_list.h.