All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends

fcl::SimpleHashTable< Key, Data, HashFnc > Class Template Reference

A simple hash table implemented as multiple buckets. HashFnc is any extended hash function: HashFnc(key) = {index1, index2, ..., }. More...

#include <hash.h>

List of all members.


Public Member Functions

 SimpleHashTable (const HashFnc &h)
void init (size_t size)
 @ brief Init the number of bins in the hash table
void insert (Key key, Data value)
std::vector< Data > query (Key key) const
 Find the elements in the hash table whose key is the same as query key.
void remove (Key key, Data value)
 remove the key-value pair from the table
void clear ()
 clear the hash table

Protected Types

typedef std::list< Data > Bin

Protected Attributes

std::vector< Bintable_
HashFnc h_
size_t table_size_

Detailed Description

template<typename Key, typename Data, typename HashFnc>
class fcl::SimpleHashTable< Key, Data, HashFnc >

A simple hash table implemented as multiple buckets. HashFnc is any extended hash function: HashFnc(key) = {index1, index2, ..., }.

Definition at line 51 of file hash.h.


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