Go to the documentation of this file.
38 #ifndef COAL_BROADPHASE_SPARSEHASHTABLE_H
39 #define COAL_BROADPHASE_SPARSEHASHTABLE_H
44 #include <unordered_map>
50 template <
typename U,
typename V>
52 typedef std::unordered_map<U, V>
Base;
59 template <
typename Key,
typename Data,
typename HashFnc,
60 template <
typename,
typename>
class TableT = unordered_map_hash_table>
64 typedef std::list<Data>
Bin;
65 typedef TableT<size_t, Bin>
Table;
76 void insert(Key key, Data value);
79 std::vector<Data>
query(Key key)
const;
82 void remove(Key key, Data value);
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
unordered_map_hash_table()
A hash table implemented using unordered_map.
void remove(Key key, Data value)
remove one key-value pair from the hash table
std::unordered_map< U, V > Base
TableT< size_t, Bin > Table
void clear()
clear the hash table
SparseHashTable(const HashFnc &h)
void insert(Key key, Data value)
insert one key-value pair into the hash table
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:59