|
GraphLab: Distributed Graph-Parallel API
2.1
|
#include <graphlab/util/small_set.hpp>
Public Member Functions | |
| small_set () | |
| Construct an empty set. | |
| small_set (const T &elem) | |
| Create a stack set with just one element. | |
| template<typename OtherT > | |
| small_set (const std::set< OtherT > &other) | |
| template<size_t OtherSize> | |
| small_set (const small_set< OtherSize, T, Less > &other) | |
| T * | begin () |
| Get the begin iterator. | |
| T * | end () |
| get the end iterator | |
| const T * | begin () const |
| Get the begin iterator. | |
| const T * | end () const |
| Get the end iterator. | |
| size_t | size () const |
| get the size of the set | |
| bool | empty () const |
| determine if there are any elements in the set | |
| bool | contains (const T &elem) const |
| test whether the set contains the given element | |
| template<size_t OtherDim> | |
| bool | contains (const small_set< OtherDim, T, Less > &other) const |
| test whether the set contains the given set of element | |
| template<size_t OtherDim> | |
| bool | operator<= (const small_set< OtherDim, T, Less > &other) const |
| template<size_t OtherDim> | |
| bool | operator< (const small_set< OtherDim, T, Less > &other) const |
| template<size_t OtherDim> | |
| bool | operator== (const small_set< OtherDim, T, Less > &other) const |
| void | insert (const T &elem) |
| insert an element into this set | |
| void | insert (const T *begin, const T *end) |
| insert a range of elements into this set | |
| void | erase (const T &elem) |
| remove an element from the set | |
| virtual const T & | operator[] (size_t index) const |
| get the element at a particular location | |
| small_set | operator+ (const T &elem) const |
| Take the union of two sets. | |
| template<size_t OtherDim> | |
| small_set< max_type< OtherDim, MAX_DIM >::value, T, Less > | operator+ (const small_set< OtherDim, T, Less > &other) const |
| Take the union of two sets. | |
| template<size_t OtherDim> | |
| small_set & | operator+= (const small_set< OtherDim, T, Less > &other) |
| Add the other set to this set. | |
| small_set & | operator+= (const T &elem) |
| template<size_t OtherDim> | |
| small_set & | operator-= (const small_set< OtherDim, T, Less > &other) |
| Remove the other set from this set. | |
| template<size_t OtherDim> | |
| small_set | operator- (const small_set< OtherDim, T, Less > &other) const |
| subtract the right set form the left set | |
| template<size_t OtherDim> | |
| small_set | operator* (const small_set< OtherDim, T, Less > &other) const |
| Take the intersection of two sets. | |
| template<size_t OtherDim> | |
| small_set | operator*= (const small_set< OtherDim, T, Less > &other) |
| Take the intersection of two sets. | |
| void | load (iarchive &arc) |
| Load the set form file. | |
| void | save (oarchive &arc) const |
| Save the set to file. | |
This class implements a dense set of fixed maximum size which support quick operations with stack allocation.
Definition at line 47 of file small_set.hpp.
|
inline |
Create a stack from an std set by adding each element one at a time
Definition at line 80 of file small_set.hpp.
|
inline |
Create a stack from an std set by adding each element one at a time
Definition at line 92 of file small_set.hpp.
|
inline |
Add an element to this set. This is "optimized" since it is used frequently
Definition at line 263 of file small_set.hpp.
|
inline |
Test if this set is contained in other. If so this returns true.
Definition at line 149 of file small_set.hpp.
|
inline |
Test if this set is contained in other. If so this returns true.
Definition at line 139 of file small_set.hpp.