Category : hashtable

Here’s a hash map which I tried to make faster for something: https://github.com/martinus/robin-hood-hashing/blob/master/src/include/robin_hood.h I tried to make it faster by making it so it could use std::unique_ptr<wchar_t[]> keys and look up keys by raw pointers, and I did this by including cwchar on line 51, and adding the code from lines 770-809, lines 1726-1778, and ..

Read more

I am having trouble defining and creating said array, however. template <typename DataType, typename KeyType> class HashTable {} contains private member Table <DataType, KeyType> *dataTable; I was told that I need to change the storage data type to be an array. Where exactly do I implement this change. Thanks for any help. Source: Windows Questions ..

Read more

I have an implementation of Hash Table with chaining: #include <functional> template <class KeyType, class ValueType> struct Node { KeyType key_; ValueType value_; Node* next_; Node(KeyType, ValueType); }; template <class KeyType, class ValueType, class Func = std::hash<KeyType>> class HashTable { public: HashTable(); explicit HashTable(Func); HashTable(size_t, double, Func = std::hash<KeyType>()); ~HashTable(); void insert(KeyType, ValueType); ValueType* find(KeyType); ..

Read more