38#ifndef COAL_BROADPHASE_SIMPLEHASHTABLE_H 
   39#define COAL_BROADPHASE_SIMPLEHASHTABLE_H 
   51template <
typename Key, 
typename Data, 
typename HashFnc>
 
   54  typedef std::list<Data> 
Bin;
 
   66  void init(
size_t size);
 
   69  void insert(Key key, Data value);
 
   73  std::vector<Data> 
query(Key key) 
const;
 
   76  void remove(Key key, Data value);
 
 
A simple hash table implemented as multiple buckets. HashFnc is any extended hash function: HashFnc(k...
Definition simple_hash_table.h:52
 
void clear()
clear the hash table
Definition simple_hash_table-inl.h:103
 
std::vector< Bin > table_
Definition simple_hash_table.h:56
 
std::vector< Data > query(Key key) const
Find the elements in the hash table whose key is the same as query key.
Definition simple_hash_table-inl.h:77
 
size_t table_size_
Definition simple_hash_table.h:60
 
HashFnc h_
Definition simple_hash_table.h:58
 
std::list< Data > Bin
Definition simple_hash_table.h:54
 
void insert(Key key, Data value)
Definition simple_hash_table-inl.h:68
 
void init(size_t size)
Init the number of bins in the hash table.
Definition simple_hash_table-inl.h:56
 
void remove(Key key, Data value)
remove the key-value pair from the table
Definition simple_hash_table-inl.h:92
 
Main namespace.
Definition broadphase_bruteforce.h:44