coal 3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
|
A hash table implemented using unordered_map. More...
#include <coal/broadphase/detail/sparse_hash_table.h>
Public Member Functions | |
SparseHashTable (const HashFnc &h) | |
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 | |
void | clear () |
clear the hash table | |
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.
|
protected |
|
protected |
coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::SparseHashTable | ( | const HashFnc & | h | ) |
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::clear | ( | ) |
clear the hash table
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::init | ( | size_t | ) |
Init the hash table. The bucket size is dynamically decided.
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::insert | ( | Key | key, |
Data | value | ||
) |
insert one key-value pair into the hash table
std::vector< Data > coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::query | ( | Key | key | ) | const |
find the elements whose key is the same as the query
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::remove | ( | Key | key, |
Data | value | ||
) |
remove one key-value pair from the hash table
|
protected |
|
protected |