View over a subset of a graph based on the set of active vertices. More...
Public Member Functions | |
frontier_view (view_container_type *vcont, Frontier &frontier) | |
frontier_view (view_container_type const &vcont, Frontier &frontier) | |
partition_type | partition () |
vertex_descriptor | add_vertex (void) |
vertex_descriptor | add_vertex (vertex_property const &vp) |
void | add_vertex (vertex_descriptor const &vd, vertex_property const &vp) |
void | add_vertex (vertex_descriptor const &vd, vertex_property const &vp, Functor const &f) |
vertex_descriptor | add_vertex_uniform (vertex_property const &vp) |
void | delete_vertex (vertex_descriptor const &vd) |
void | add_edge_async (vertex_descriptor const &src, vertex_descriptor const &tgt) |
Adds an edge between the two given vertices with given property. The edge is added asynchronously and method returns immediately. Edge is not guaranteed to be added until after a global synchronization. More... | |
void | add_edge_async (vertex_descriptor const &src, vertex_descriptor const &tgt, edge_property const &p) |
void | add_edge_async (edge_descriptor const &ed) |
Adds an edge with given descriptor. The edge is added asynchronously and method returns immediately. Edge is not guaranteed to be added until after a global synchronization. More... | |
void | add_edge_async (edge_descriptor const &ed, edge_property const &p) |
edge_descriptor | add_edge (vertex_descriptor const &src, vertex_descriptor const &tgt) |
Adds an edge between the two given vertices. More... | |
edge_descriptor | add_edge (vertex_descriptor const &src, vertex_descriptor const &tgt, edge_property const &p) |
edge_descriptor | add_edge (edge_descriptor const &ed) |
Adds an edge with given descriptor. More... | |
edge_descriptor | add_edge (edge_descriptor const &ed, edge_property const &p) |
edge_descriptor | insert_edge (vertex_descriptor const &src, vertex_descriptor const &tgt, edge_property const &p, Comp const &comp) |
edge_descriptor | insert_edge (edge_descriptor const &ed, edge_property const &p, Comp const &comp) |
void | insert_edge_async (vertex_descriptor const &src, vertex_descriptor const &tgt, edge_property const &p, Comp const &comp) |
void | insert_edge_async (edge_descriptor const &ed, edge_property const &p, Comp const &comp) |
void | delete_edge (vertex_descriptor const &src, vertex_descriptor const &tgt) |
void | delete_edge (edge_descriptor const &ed) |
void | clear (void) |
vertex_iterator | find_vertex (vertex_descriptor const &vd) const |
size_t | num_vertices (void) const |
size_t | num_edges (void) const |
size_t | num_edges_collective (void) const |
size_t | num_local_edges (void) const |
bool | is_directed (void) const |
void | sort_edges_ascending (void) |
void | sort_edges_locality (void) |
void | sort_edges (Comp const &comp) |
void | apply_set (vertex_descriptor const &gid, F const &f) |
void | vp_apply_async (vertex_descriptor const &vd, Functor const &f) |
Functor::result_type | vp_apply (vertex_descriptor const &vd, Functor const &f) const |
void | ep_apply_async (edge_descriptor const &ed, Functor const &f) |
Functor::result_type | ep_apply (edge_descriptor const &ed, Functor const &f) |
vertices_view_type | vertices (void) const |
Returns an Array over the vertices of the graph. | |
future< bool > | has_edge (vertex_descriptor const &source, vertex_descriptor const &target) |
Determines whether there exists an edge between two vertices. More... | |
bool | is_valid (void) const |
view_container_type * | get_container (void) const |
view_container_type & | container (void) |
view_container_type & | container (void) const |
domain_type const & | domain (void) const |
domain_type & | domain (void) |
void | set_domain (domain_type const &dom) |
map_func_type const & | mapfunc (void) const |
size_type | size (void) const |
Returns the number of elements referenced for the view. | |
bool | empty (void) const |
Returns true if the view does not reference any element. | |
View Write Operations | |
template<class Functor > | |
void | apply_set (index_t const &index, Functor f) |
Applies the provided function to the value referenced for the given index and mutates the element with the resulting value. More... | |
void | set_element (index_t const &index, value_t const &value) |
Set the element index in the container to value value . More... | |
View Read Operations | |
value_type | get_element (index_t const &index) const |
Get the element index from the container. More... | |
future< value_type > | get_element_split (index_t const &index) const |
Get the element index from the container. More... | |
template<class Functor > | |
Functor::result_type | apply_get (index_t const &index, Functor f) |
Applies the provided function to the value referenced for the given index and returns the result of the operation. More... | |
template<class Functor > | |
Functor::result_type | apply_get (index_t const &index, Functor f) const |
Applies the provided function to the value referenced for the given index and returns the result of the operation. More... | |
View Subscript Operations | |
reference_t | operator[] (index_t const &index) const |
The bracket operator is the basic access method. | |
reference_t | make_reference (index_t const &index) const |
Sequence Iterator | |
| |
iterator | begin (void) |
const_iterator | begin (void) const |
iterator | end (void) |
const_iterator | end (void) const |
iterator | make_iterator (index_t i) |
index_t | next (index_t const &index) const |
Computes the next index based on the given index . More... | |
index_t | prev (index_t const &index) const |
Computes the previous index based on the given index . More... | |
index_t | advance (index_t const &index, Distance n) const |
Computes the new index after advance n positions from the given index . More... | |
long | distance (index_t const &index1, index_t const &index2) const |
bool | less_than (index_t const &index1, index_t const &index2) const |
Public Types | |
using | base_type = graph_view< PG, domain_type, map_function, frontier_view > |
using | partition_type = single_element_range< Frontier > |
typedef sequence_op_type::iterator | iterator |
Type for global-iterator over vertices (compatibility). | |
typedef sequence_op_type::const_iterator | const_iterator |
typedef sequence_op_type::iterator | vertex_iterator |
Type for global-iterator over vertices. | |
typedef sequence_op_type::const_iterator | const_vertex_iterator |
typedef PG::adj_edge_iterator | adj_edge_iterator |
Type for iterator over adjacent edges of a vertex. | |
typedef PG::const_adj_edge_iterator | const_adj_edge_iterator |
typedef PG::vertex_property | vertex_property |
typedef PG::edge_property | edge_property |
typedef PG::vertex_descriptor | vertex_descriptor |
typedef PG::edge_descriptor | edge_descriptor |
typedef PG::vertex_reference | vertex_reference |
typedef array_view< PG, view_traits< frontier_view< PG, Frontier, OptionalParams... > >::domain_type > | vertices_view_type |
typedef PG | view_container_type |
typedef view_traits< frontier_view< PG, Frontier, OptionalParams... > >::domain_type | domain_type |
typedef view_traits< frontier_view< PG, Frontier, OptionalParams... > >::map_function | map_func_type |
typedef mf_type_helper::index_type | index_type |
typedef mf_type_helper::gid_type | gid_type |
typedef std::size_t | size_type |
using | reference_t = typename view_traits< graph_view< PG, view_traits< frontier_view< PG, Frontier, OptionalParams... > >::domain_type, view_traits< frontier_view< PG, Frontier, OptionalParams... > >::map_function, frontier_view< PG, Frontier, OptionalParams... > > >::reference |
typedef detail::make_iterator< select_derived< frontier_view< PG, Frontier, OptionalParams... >, graph_view< PG, view_traits< frontier_view< PG, Frontier, OptionalParams... > >::domain_type, view_traits< frontier_view< PG, Frontier, OptionalParams... > >::map_function, frontier_view< PG, Frontier, OptionalParams... > > >::type, iterator > | make_iterator_t |
Public Attributes | |
PG * | m_ptr |
sptr_type | m_sptr |
Protected Member Functions | |
PG * | container_ptr (void) const |
Returns the container's pointer. | |
View over a subset of a graph based on the set of active vertices.
PG | The graph container |
Frontier | The frontier storing the set of active vertices |
Dom | The domain of the view |
MapFunc | The mapping function |
Derived | The most derived view |
|
inherited |
Adds a vertex to the pGraph with a default-constructed property.
Vertex-descriptor is assigned automatically by the pGraph. This method is asynchronous. The vertex is added at the calling location, which is also the home location for the vertex.
|
inherited |
Adds a vertex to the pGraph with the given property.
vp | Property of the vertex. |
Vertex-descriptor is assigned automatically by the pGraph. This method is asynchronous. The vertex is added at the calling location, which is also the home location for the vertex.
|
inherited |
Adds a vertex to the pGraph with the given property and descriptor.
gid | descriptor of the vertex. |
vp | Property of the vertex. |
This method is asynchronous. The vertex is added at the calling location. An async is sent to the home-location of the vertex.
|
inherited |
Adds a vertex to the pGraph with the given property and descriptor, if the vertex does not exist, or applies the given functor to the existing vertex. The vertex is added to the home location, unlike the other add_vertex calls that add the vertex at the current location.
gid | descriptor of the vertex. |
vp | Property of the vertex. |
f | Function to apply to the vertex if it already exists. |
This method is asynchronous. The vertex is added at the home-location.
|
inherited |
Adds a vertex to the pGraph with the given property to a location based on the vertex descriptor assigned by the graph. This method is asynchronous. This method differs from the typical add_vertex as it inserts the vertex into a potentially remote location, rather than the calling location.
vp | Property of the vertex. |
|
inherited |
|
inherited |
Adds an edge between the two given vertices with given property. The edge is added asynchronously and method returns immediately. Edge is not guaranteed to be added until after a global synchronization.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
|
inherited |
Adds an edge between the two given vertices with given property. The edge is added asynchronously and method returns immediately. Edge is not guaranteed to be added until after a global synchronization.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
ep | Property of the edge. |
|
inherited |
Adds an edge with given descriptor. The edge is added asynchronously and method returns immediately. Edge is not guaranteed to be added until after a global synchronization.
ed | Descriptor of the desired edge. |
|
inherited |
Adds an edge with given descriptor and property. The edge is added asynchronously and method returns immediately. Edge is not guaranteed to be added until after a global synchronization.
ed | Descriptor of the desired edge. |
ep | Property of the edge. |
|
inherited |
Adds an edge between the two given vertices.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
|
inherited |
Adds an edge between the two given vertices with given property.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
ep | Property of the edge. |
|
inherited |
Adds an edge with given descriptor.
ed | Descriptor of the desired edge. |
|
inherited |
Adds an edge with given descriptor and property.
ed | Descriptor of the desired edge. |
ep | Property of the edge. |
|
inherited |
Adds an edge between the two given vertices with given property.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
ep | Property of the edge. |
comp | Comparator workfunction passed to std::lower_bound to determine where to insert the edge. |
|
inherited |
Adds an edge between the two given vertices with given property.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
ep | Property of the edge. |
comp | Comparator workfunction passed to std::lower_bound to determine where to insert the edge. |
|
inherited |
Inserts an edge with given descriptor and property. The edge is inserted asynchronously and method returns immediately. Edge is not guaranteed to be inserted until after a global synchronization.
ed | Descriptor of the desired edge. |
ep | Property of the edge. |
|
inherited |
Inserts an edge with given descriptor and property. The edge is inserted asynchronously and method returns immediately. Edge is not guaranteed to be inserted until after a global synchronization.
ed | Descriptor of the desired edge. |
ep | Property of the edge. |
|
inherited |
Deletes the edge between the given source and target vertices. The edge is deleted asynchronously. The edge is not guaranteed to have been deleted until after a global synchronization.
source | Descriptor of the source vertex. |
target | Descriptor of the target vertex. |
|
inherited |
Deletes the edge with given descriptor. Asynchronous.
ed | Descriptor of the desired edge. |
|
inherited |
Clears the graph. This resets internal counters for vertex-descriptor and edge-id assignments, and clears graph storage.
|
inherited |
Returns a global vertex iterator to the given descriptor.
gid | Descriptor of the desired vertex. |
Wrapper around make_iterator for compatibility. Does not enforce the existence of the vertex.
|
inherited |
Return the number of vertices in the graph.
This is the same as calling g.size(). This method is one-sided, If other locations may be concurrently performing operations that change their local size and the effects are desired to be observed in a deterministic way, then appropriate synchronization, e.g. a fence, may be required before or after the call to size, to enforce appropriate ordering.
|
inherited |
Returns the number of edges in the pGraph. This method is a non-collective version of num_edges. This must be used when not all locations are calling num_edges.
For a faster collective, use num_edges_collective() below.
|
inherited |
Returns the number of edges in the pGraph.
|
inherited |
Returns the number of local outgoing edges in the pGraph. This is a blocking method.
|
inherited |
Sorts edges of each vertex in ascending order of target-vertex-id.
|
inherited |
Sorts edges of each vertex by home-location of target-vertex.
|
inherited |
Sorts edges of each vertex by user-defined comparison function.
|
inherited |
Applies a function to the vertex with the given descriptor.
gid | Descriptor of the vertex. |
f | Functor to be applied to the target vertex. |
|
inherited |
Applies the provided function to the value referenced for the given index and mutates the element with the resulting value.
index | of element to apply the function |
f | function to apply |
|
inherited |
Applies a function to the property of vertex with given descriptor. This method is asynchronous.
gid | Descriptor of the vertex. |
f | Functor to be applied to the target vertex's property. |
|
inherited |
Applies a function to the property of vertex with given descriptor.
gid | Descriptor of the vertex. |
f | Functor to be applied to the target vertex's property. |
|
inherited |
Applies a function to the property of edge with given descriptor. This method is asynchronous.
ed | Descriptor of the edge. |
f | Functor to be applied to the target edge's property. |
|
inherited |
Applies a function to the property of edge with given descriptor.
ed | Descriptor of the edge. |
f | Functor to be applied to the target edge's property. |
|
inherited |
Determines whether there exists an edge between two vertices.
|
inherited |
|
inherited |
|
inherited |
Get the element index
from the container.
index | of element to get |
|
inherited |
Get the element index
from the container.
index | of element to get |
|
inherited |
Applies the provided function to the value referenced for the given index and returns the result of the operation.
index | of element to apply the function |
f | function to apply |
|
inherited |
|
inherited |
Set the element index
in the container to value value
.
index | Index of element to set. |
value | New value to set. |
|
inherited |
Computes the next index based on the given index
.
Overwriting this method allows produce a different way to traverse the elements referenced by the view.
|
inherited |
Computes the previous index based on the given index
.
Overwriting this method allows produce a different way to traverse the elements referenced by the view.
|
inherited |
Computes the new index after advance n
positions from the given index
.
Overwriting this method allows produce a different way to traverse the elements referenced by the view.