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

#include <graphlab/util/hopscotch_set.hpp>

List of all members.

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_setoperator= (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)

Detailed Description

template<typename Key, bool Synchronized = true, typename Hash = _HOPSCOTCH_SET_DEFAULT_HASH, typename KeyEqual = std::equal_to<Key>>
class graphlab::hopscotch_set< Key, Synchronized, Hash, KeyEqual >

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.

Template Parameters:
KeyThe key of the set
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 64 of file hopscotch_set.hpp.


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