GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
graphlab::hopscotch_map< Key, Value, Synchronized, Hash, KeyEqual > Class Template Reference

#include <graphlab/util/hopscotch_map.hpp>

List of all members.

Public Types

typedef Key key_type
typedef std::pair< Key, Value > value_type
typedef Value mapped_type
typedef size_t size_type
typedef Hash hasher
typedef KeyEqual equality_function
typedef value_type * pointer
typedef value_type & reference
typedef const value_type * const_pointer
typedef const value_type & const_reference
typedef std::pair< Key, Value > storage_type
typedef hopscotch_table
< storage_type, Synchronized,
hash_redirect,
key_equal_redirect > 
container_type
typedef container_type::iterator iterator
typedef
container_type::const_iterator 
const_iterator

Public Member Functions

 hopscotch_map (Hash hashfun=Hash(), KeyEqual equalfun=KeyEqual())
 hopscotch_map (const hopscotch_map &h)
void rehash (size_t s)
hasher hash_function () const
KeyEqual key_eq () const
hopscotch_mapoperator= (const hopscotch_map &other)
size_type size () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
std::pair< iterator, bool > insert (const value_type &v)
iterator insert (const_iterator hint, const value_type &v)
iterator find (key_type const &k)
const_iterator find (key_type const &k) const
size_t count (key_type const &k) const
bool erase (iterator iter)
bool erase (key_type const &k)
void swap (hopscotch_map &other)
mapped_type & operator[] (const key_type &i)
void clear ()
size_t capacity () const
float load_factor () const
void save (oarchive &oarc) const
void load (iarchive &iarc)
void put_sync (const value_type &v)
void put_sync (const Key &k, const Value &v)
std::pair< bool, Value > get_sync (const Key &k) const
bool erase_sync (const Key &k)

Detailed Description

template<typename Key, typename Value, bool Synchronized = true, typename Hash = _HOPSCOTCH_MAP_DEFAULT_HASH, typename KeyEqual = std::equal_to<Key>>
class graphlab::hopscotch_map< Key, Value, Synchronized, Hash, KeyEqual >

A hopscotch hash map. More or less similar interface as boost::unordered_map, not necessarily entirely STL compliant. Really should only be used to store small keys and trivial values.

Template Parameters:
KeyThe key of the map
ValueThe value to store for each key
SynchronizedDefaults to True. If True, locking is used to ensure safe reads and writes to the hash table. Even under "Synchronized", the only operations which are safe for parallel access are all functions suffixed with "sync".
HashThe hash functor type. Defaults to std::hash<Key> if C++11 is available. Otherwise defaults to boost::hash<Key>
KeyEqualThe functor used to identify object equality. Defaults to std::equal_to<Key>

Definition at line 66 of file hopscotch_map.hpp.


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