GraphLab: Distributed Graph-Parallel API
2.1
|
#include <graphlab/util/hopscotch_map.hpp>
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_map & | operator= (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) |
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.
Key | The key of the map |
Value | The value to store for each key |
Synchronized | Defaults 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". |
Hash | The hash functor type. Defaults to std::hash<Key> if C++11 is available. Otherwise defaults to boost::hash<Key> |
KeyEqual | The functor used to identify object equality. Defaults to std::equal_to<Key> |
Definition at line 66 of file hopscotch_map.hpp.