GraphLab: Distributed Graph-Parallel API
2.1
|
#include <graphlab/util/hopscotch_set.hpp>
Public Types | |
typedef Key | value_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 Key | storage_type |
typedef hopscotch_table < storage_type, Synchronized, Hash, KeyEqual > | container_type |
typedef container_type::iterator | iterator |
typedef container_type::const_iterator | const_iterator |
Public Member Functions | |
hopscotch_set (size_t initialsize=32, Hash hashfun=Hash(), KeyEqual equalfun=KeyEqual()) | |
hopscotch_set (const hopscotch_set &h) | |
void | rehash (size_t s) |
hasher | hash_function () const |
KeyEqual | key_eq () const |
hopscotch_set & | operator= (const hopscotch_set &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 (value_type const &v) |
const_iterator | find (value_type const &v) const |
size_t | count (value_type const &v) const |
bool | erase (iterator iter) |
bool | erase (value_type const &v) |
void | swap (hopscotch_set &other) |
void | clear () |
size_t | capacity () const |
float | load_factor () const |
void | save (oarchive &oarc) const |
void | load (iarchive &iarc) |
A hopscotch hash set. More or less similar interface as boost::unordered_set, not necessarily entirely STL compliant. Really should only be used to store small keys and trivial values.
Key | The key of the set |
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 64 of file hopscotch_set.hpp.