Public Member Functions | Protected Types | Protected Attributes | List of all members
coal::detail::SparseHashTable< Key, Data, HashFnc, TableT > Class Template Reference

A hash table implemented using unordered_map. More...

#include <sparse_hash_table.h>

Public Member Functions

void clear ()
 clear the hash table More...
 
void init (size_t)
 Init the hash table. The bucket size is dynamically decided. More...
 
void insert (Key key, Data value)
 insert one key-value pair into the hash table More...
 
std::vector< Data > query (Key key) const
 find the elements whose key is the same as the query More...
 
void remove (Key key, Data value)
 remove one key-value pair from the hash table More...
 
 SparseHashTable (const HashFnc &h)
 

Protected Types

typedef std::list< Data > Bin
 
typedef TableT< size_t, BinTable
 

Protected Attributes

HashFnc h_
 
Table table_
 

Detailed Description

template<typename Key, typename Data, typename HashFnc, template< typename, typename > class TableT = unordered_map_hash_table>
class coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >

A hash table implemented using unordered_map.

Definition at line 61 of file coal/broadphase/detail/sparse_hash_table.h.

Member Typedef Documentation

◆ Bin

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
typedef std::list<Data> coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::Bin
protected

Definition at line 64 of file coal/broadphase/detail/sparse_hash_table.h.

◆ Table

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
typedef TableT<size_t, Bin> coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::Table
protected

Definition at line 65 of file coal/broadphase/detail/sparse_hash_table.h.

Constructor & Destructor Documentation

◆ SparseHashTable()

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT>
coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::SparseHashTable ( const HashFnc &  h)

Member Function Documentation

◆ clear()

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT>
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::clear

clear the hash table

Definition at line 104 of file coal/broadphase/detail/sparse_hash_table-inl.h.

◆ init()

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT>
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::init ( size_t  )

Init the hash table. The bucket size is dynamically decided.

Definition at line 58 of file coal/broadphase/detail/sparse_hash_table-inl.h.

◆ insert()

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT>
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::insert ( Key  key,
Data  value 
)

insert one key-value pair into the hash table

Definition at line 65 of file coal/broadphase/detail/sparse_hash_table-inl.h.

◆ query()

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT>
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

Definition at line 74 of file coal/broadphase/detail/sparse_hash_table-inl.h.

◆ remove()

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT>
void coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::remove ( Key  key,
Data  value 
)

remove one key-value pair from the hash table

Definition at line 93 of file coal/broadphase/detail/sparse_hash_table-inl.h.

Member Data Documentation

◆ h_

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
HashFnc coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::h_
protected

Definition at line 63 of file coal/broadphase/detail/sparse_hash_table.h.

◆ table_

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
Table coal::detail::SparseHashTable< Key, Data, HashFnc, TableT >::table_
protected

Definition at line 67 of file coal/broadphase/detail/sparse_hash_table.h.


The documentation for this class was generated from the following files:


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:45:00