Go to the documentation of this file.
38 #ifndef HPP_FCL_BROADPHASE_SPARSEHASHTABLE_H
39 #define HPP_FCL_BROADPHASE_SPARSEHASHTABLE_H
44 #include <unordered_map>
51 template <
typename U,
typename V>
53 typedef std::unordered_map<U, V>
Base;
60 template <
typename Key,
typename Data,
typename HashFnc,
61 template <
typename,
typename>
class TableT = unordered_map_hash_table>
65 typedef std::list<Data>
Bin;
66 typedef TableT<size_t, Bin>
Table;
77 void insert(Key key, Data value);
80 std::vector<Data>
query(Key key)
const;
83 void remove(Key key, Data value);
std::unordered_map< U, V > Base
SparseHashTable(const HashFnc &h)
unordered_map_hash_table()
void init(size_t)
Init the hash table. The bucket size is dynamically decided.
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
void clear()
clear the hash table
TableT< size_t, Bin > Table
A hash table implemented using unordered_map.
void insert(Key key, Data value)
insert one key-value pair into the hash table
hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:15