| 
    hpp-fcl
    2.4.1
    
   HPP fork of FCL -- The Flexible Collision Library 
   | 
 
 
 
 
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::list< Data > Bin
Definition: sparse_hash_table.h:65
 
SparseHashTable(const HashFnc &h)
Definition: sparse_hash_table-inl.h:51
 
unordered_map_hash_table()
Definition: sparse_hash_table.h:56
 
Definition: sparse_hash_table.h:52
 
void init(size_t)
Init the hash table. The bucket size is dynamically decided.
Definition: sparse_hash_table-inl.h:59
 
Main namespace.
Definition: broadphase_bruteforce.h:44
 
std::vector< Data > query(Key key) const
find the elements whose key is the same as the query
Definition: sparse_hash_table-inl.h:75
 
void remove(Key key, Data value)
remove one key-value pair from the hash table
Definition: sparse_hash_table-inl.h:94
 
Table table_
Definition: sparse_hash_table.h:68
 
void clear()
clear the hash table
Definition: sparse_hash_table-inl.h:105
 
TableT< size_t, Bin > Table
Definition: sparse_hash_table.h:66
 
A hash table implemented using unordered_map.
Definition: sparse_hash_table.h:62
 
void insert(Key key, Data value)
insert one key-value pair into the hash table
Definition: sparse_hash_table-inl.h:66
 
HashFnc h_
Definition: sparse_hash_table.h:64