GraphLab: Distributed Graph-Parallel API
2.1
|
Describes a set of vertices. More...
#include <graphlab/graph/vertex_set.hpp>
Public Member Functions | |
vertex_set () | |
default constructor which constructs an empty set. | |
vertex_set (bool complete) | |
vertex_set (const vertex_set &other) | |
copy constructor | |
vertex_set & | operator= (const vertex_set &other) |
copyable | |
bool | l_contains (lvid_type lvid) const |
vertex_set | operator& (const vertex_set &other) const |
Takes the set intersection of two vertex sets. | |
vertex_set | operator| (const vertex_set &other) const |
Takes the set union of two vertex sets. | |
vertex_set | operator- (const vertex_set &other) const |
Takes the set difference of two vertex sets. | |
vertex_set & | operator&= (const vertex_set &other) |
Takes the set intersection of the current vertex set with another vertex set. | |
vertex_set & | operator|= (const vertex_set &other) |
Takes the set union of the current vertex set with another vertex set. | |
vertex_set & | operator-= (const vertex_set &other) |
Takes the set difference of the current vertex set with another vertex set. | |
vertex_set | operator~ () const |
Returns the inverse of the current set. | |
void | invert () |
Inverts the current set in-place. |
Describes a set of vertices.
The vertex_set describes a set of vertices upon which union / intersection / difference can be performed. These sets can then be passed into graph aggregate operations such as distributed_graph::map_reduce_vertices to perform aggregates over subsets of vertices or edges. Engines also permit signalling of sets of vertices through signal_all().
distributed_graph::complete_set() and distributed_graph::empty_set() provide two convenient functions to obtain a full or an empty set of vertices.
distributed_graph::select() can be used to obtain a restriction of the set of vertices. For instance if vertices contain an integer, the following code will construct a set of vertices containing only vertices with data which are a multiple of 2.
For more details see distributed_graph::select()
The size of the vertex set can only be queried through the graph using distributed_graph::vertex_set_size();
Definition at line 71 of file vertex_set.hpp.
|
inlineexplicit |
Constructs a completely empty, or a completely full vertex set
complete | If set to true, creates a set of all vertices. If set to false, creates an empty set. |
Definition at line 234 of file vertex_set.hpp.
|
inline |
Inverts the current set in-place.
A vertex is in the result b
if and only if it is not in b
Definition at line 421 of file vertex_set.hpp.
|
inline |
Takes the set intersection of two vertex sets.
A vertex is in intersection_result
if and only if the vertex is in both set a
and set b
.
Definition at line 273 of file vertex_set.hpp.
|
inline |
Takes the set intersection of the current vertex set with another vertex set.
A vertex is in the resultant a
if and only if the vertex was in both set a
and set b
.
Definition at line 329 of file vertex_set.hpp.
|
inline |
Takes the set difference of two vertex sets.
A vertex is in difference_result
if and only if the vertex is in set a and not in set b.
Equivalent to:
Definition at line 312 of file vertex_set.hpp.
|
inline |
Takes the set difference of the current vertex set with another vertex set.
A vertex is in the resultant a
if and only if the vertex was in set a
but not in set b
.
Conceptually equivalent to
Definition at line 384 of file vertex_set.hpp.
|
inline |
Takes the set union of two vertex sets.
A vertex is in union_result
if and only if the vertex is in either of set a
and set b
.
Definition at line 289 of file vertex_set.hpp.
|
inline |
Takes the set union of the current vertex set with another vertex set.
A vertex is in the resultant a
if and only if the vertex was in either set a
and set b
.
Definition at line 354 of file vertex_set.hpp.
|
inline |
Returns the inverse of the current set.
A vertex is in inv_b
if and only if it is not in b
Definition at line 407 of file vertex_set.hpp.