A hash table implemented using unordered_map. More...
#include <hash.h>
Public Member Functions | |
| void | clear () |
| clear the hash table | |
| void | init (size_t) |
| Init the hash table. The bucket size is dynamically decided. | |
| void | insert (Key key, Data value) |
| insert one key-value pair into the hash table | |
| std::vector< Data > | query (Key key) const |
| find the elements whose key is the same as the query | |
| void | remove (Key key, Data value) |
| remove one key-value pair from the hash table | |
| SparseHashTable (const HashFnc &h) | |
Protected Types | |
| typedef std::list< Data > | Bin |
| typedef TableT< size_t, Bin > | Table |
Protected Attributes | |
| HashFnc | h_ |
| Table | table_ |
A hash table implemented using unordered_map.
typedef std::list<Data> fcl::SparseHashTable< Key, Data, HashFnc, TableT >::Bin [protected] |
typedef TableT<size_t, Bin> fcl::SparseHashTable< Key, Data, HashFnc, TableT >::Table [protected] |
| fcl::SparseHashTable< Key, Data, HashFnc, TableT >::SparseHashTable | ( | const HashFnc & | h | ) | [inline] |
| void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::clear | ( | ) | [inline] |
| void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::init | ( | size_t | ) | [inline] |
| void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::insert | ( | Key | key, |
| Data | value | ||
| ) | [inline] |
| std::vector<Data> fcl::SparseHashTable< Key, Data, HashFnc, TableT >::query | ( | Key | key | ) | const [inline] |
| void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::remove | ( | Key | key, |
| Data | value | ||
| ) | [inline] |
HashFnc fcl::SparseHashTable< Key, Data, HashFnc, TableT >::h_ [protected] |
Table fcl::SparseHashTable< Key, Data, HashFnc, TableT >::table_ [protected] |