All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Types | Protected Attributes
fcl::SparseHashTable< Key, Data, HashFnc, TableT > Class Template Reference

A hash table implemented using unordered_map. More...

#include <hash.h>

List of all members.

Public Member Functions

void clear ()
 clear the hash table
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
 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 fcl::SparseHashTable< Key, Data, HashFnc, TableT >

A hash table implemented using unordered_map.

Definition at line 129 of file hash.h.


Member Typedef Documentation

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
typedef std::list<Data> fcl::SparseHashTable< Key, Data, HashFnc, TableT >::Bin [protected]

Definition at line 133 of file hash.h.

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
typedef TableT<size_t, Bin> fcl::SparseHashTable< Key, Data, HashFnc, TableT >::Table [protected]

Definition at line 134 of file hash.h.


Constructor & Destructor Documentation

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
fcl::SparseHashTable< Key, Data, HashFnc, TableT >::SparseHashTable ( const HashFnc &  h) [inline]

Definition at line 138 of file hash.h.


Member Function Documentation

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::clear ( ) [inline]

clear the hash table

Definition at line 179 of file hash.h.

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::init ( size_t  ) [inline]

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

Definition at line 141 of file hash.h.

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::insert ( Key  key,
Data  value 
) [inline]

insert one key-value pair into the hash table

Definition at line 144 of file hash.h.

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
std::vector<Data> fcl::SparseHashTable< Key, Data, HashFnc, TableT >::query ( Key  key) const [inline]

find the elements whose key is the same as the query

Definition at line 152 of file hash.h.

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
void fcl::SparseHashTable< Key, Data, HashFnc, TableT >::remove ( Key  key,
Data  value 
) [inline]

remove one key-value pair from the hash table

Definition at line 168 of file hash.h.


Member Data Documentation

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
HashFnc fcl::SparseHashTable< Key, Data, HashFnc, TableT >::h_ [protected]

Definition at line 132 of file hash.h.

template<typename Key , typename Data , typename HashFnc , template< typename, typename > class TableT = unordered_map_hash_table>
Table fcl::SparseHashTable< Key, Data, HashFnc, TableT >::table_ [protected]

Definition at line 136 of file hash.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


fcl
Author(s): Jia Pan
autogenerated on Tue Jan 15 2013 16:05:32