38 #ifndef HPP_FCL_BROADPHASE_SIMPLEHASHTABLE_H 39 #define HPP_FCL_BROADPHASE_SIMPLEHASHTABLE_H 52 template <
typename Key,
typename Data,
typename HashFnc>
55 typedef std::list<Data>
Bin;
67 void init(
size_t size);
70 void insert(Key key, Data value);
74 std::vector<Data>
query(Key key)
const;
77 void remove(Key key, Data
value);
SimpleHashTable(const HashFnc &h)
std::vector< Data > query(Key key) const
Find the elements in the hash table whose key is the same as query key.
void init(size_t size)
Init the number of bins in the hash table.
void clear()
clear the hash table
void insert(Key key, Data value)
A simple hash table implemented as multiple buckets. HashFnc is any extended hash function: HashFnc(k...
std::vector< Bin > table_