named_graph is a mixin that provides names for the vertices of a graph, including a mapping from names to vertices. More...
#include <named_graph.hpp>
Classes | |
struct | lazy_add_edge |
Data structure returned from add_edge that will "lazily" add the edge, either when it is converted to a pair<edge_descriptor,bool> or when the most recent copy has been destroyed. More... | |
struct | lazy_add_edge_with_property |
Data structure returned from add_edge that will "lazily" add the edge with a property, either when it is converted to a pair<edge_descriptor,bool> or when the most recent copy has been destroyed. More... | |
struct | lazy_add_vertex |
Data structure returned from add_vertex that will "lazily" add the vertex, either when it is converted to a vertex_descriptor or when the most recent copy has been destroyed. More... | |
Public Types | |
enum | message_kind { msg_add_vertex_name, msg_add_vertex_name_with_reply, msg_find_vertex, msg_add_edge_name_name, msg_add_edge_vertex_name, msg_add_edge_name_vertex, msg_add_edge_name_name_with_reply, msg_add_edge_vertex_name_with_reply, msg_add_edge_name_vertex_with_reply, msg_add_edge_name_name_with_property, msg_add_edge_vertex_name_with_property, msg_add_edge_name_vertex_with_property, msg_add_edge_name_name_with_reply_and_property, msg_add_edge_vertex_name_with_reply_and_property, msg_add_edge_name_vertex_with_reply_and_property } |
Messages passed within the distributed named graph. More... | |
typedef Vertex | vertex_descriptor |
The vertex descriptor type. More... | |
typedef Edge | edge_descriptor |
The edge descriptor type. More... | |
typedef Config::vertex_property_type | vertex_property_type |
The vertex property type. More... | |
typedef Config::edge_property_type | edge_property_type |
The vertex property type. More... | |
typedef internal_vertex_name < vertex_property_type >::type | extract_name_type |
The type used to extract names from the property structure. More... | |
typedef remove_cv< typename remove_reference< typename extract_name_type::result_type > ::type >::type | vertex_name_type |
The type used to name vertices in the graph. More... | |
typedef Config::distribution_type | distribution_type |
The type used to distribute named vertices in the graph. More... | |
typedef Config::base_distribution_type | base_distribution_type |
typedef Config::process_group_type | process_group_type |
The type used for communication in the distributed structure. More... | |
typedef process_group_type::process_id_type | process_id_type |
Type used to identify processes. More... | |
typedef named_graph | named_graph_type |
a reference to this class, which is used for disambiguation of the More... | |
Public Member Functions | |
named_graph (const process_group_type &pg) | |
Construct the named_graph with a particular process group. More... | |
named_graph (const process_group_type &pg, const base_distribution_type &distribution) | |
Construct the named_graph mixin with a particular process group and distribution function. More... | |
void | setup_triggers () |
Set up triggers, but only for the BSP process group. More... | |
Graph & | derived () |
Retrieve the derived instance. More... | |
const Graph & | derived () const |
process_group_type & | process_group () |
Retrieve the process group. More... | |
const process_group_type & | process_group () const |
distribution_type & | named_distribution () |
const distribution_type & | named_distribution () const |
void | added_vertex (Vertex) |
Notify the named_graph that we have added the given vertex. More... | |
template<typename VertexIterStability > | |
void | removing_vertex (Vertex, VertexIterStability) |
Notify the named_graph that we are removing the given vertex. More... | |
void | clearing_graph () |
Notify the named_graph that we are clearing the graph. More... | |
process_id_type | owner_by_property (const vertex_property_type &) |
Retrieve the owner of a given vertex based on the properties associated with that vertex. More... | |
template<typename U , typename V > | |
boost::parallel::detail::untracked_pair < typename named_graph< Graph, Vertex, Edge, Config > ::edge_descriptor, bool > | handle_add_edge_with_reply (int source, int, const boost::parallel::detail::untracked_pair< U, V > &msg, trigger_receive_context) |
template<typename U , typename V > | |
boost::parallel::detail::untracked_pair < typename named_graph< Graph, Vertex, Edge, Config > ::edge_descriptor, bool > | handle_add_edge_with_reply_and_property (int source, int tag, const pair_with_property< U, V, edge_property_type > &msg, trigger_receive_context) |
Protected Member Functions | |
void | handle_add_vertex_name (int source, int tag, const vertex_name_type &msg, trigger_receive_context) |
vertex_descriptor | handle_add_vertex_name_with_reply (int source, int tag, const vertex_name_type &msg, trigger_receive_context) |
boost::parallel::detail::untracked_pair < vertex_descriptor, bool > | handle_find_vertex (int source, int tag, const vertex_name_type &msg, trigger_receive_context) |
template<typename U , typename V > | |
void | handle_add_edge (int source, int tag, const boost::parallel::detail::untracked_pair< U, V > &msg, trigger_receive_context) |
template<typename U , typename V > | |
boost::parallel::detail::untracked_pair < edge_descriptor, bool > | handle_add_edge_with_reply (int source, int tag, const boost::parallel::detail::untracked_pair< U, V > &msg, trigger_receive_context) |
template<typename U , typename V > | |
void | handle_add_edge_with_property (int source, int tag, const pair_with_property< U, V, edge_property_type > &msg, trigger_receive_context) |
template<typename U , typename V > | |
boost::parallel::detail::untracked_pair < edge_descriptor, bool > | handle_add_edge_with_reply_and_property (int source, int tag, const pair_with_property< U, V, edge_property_type > &msg, trigger_receive_context) |
Protected Attributes | |
process_group_type | process_group_ |
The process group for this distributed data structure. More... | |
distribution_type | distribution_ |
The distribution we will use to map names to processors. More... | |
Friends | |
struct | lazy_add_vertex |
struct | lazy_add_edge |
struct | lazy_add_edge_with_property |
named_graph is a mixin that provides names for the vertices of a graph, including a mapping from names to vertices.
Graph types that may or may not be have vertex names (depending on the properties supplied by the user) should use maybe_named_graph.
Template parameters:
Graph: the graph type that derives from named_graph
Vertex: the type of a vertex descriptor in Graph. Note: we cannot use graph_traits here, because the Graph is not yet defined.
VertexProperty: the type of the property stored along with the vertex.
ProcessGroup: the process group over which the distributed name graph mixin will communicate.
typedef Config::base_distribution_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::base_distribution_type |
typedef Config::distribution_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::distribution_type |
The type used to distribute named vertices in the graph.
typedef Edge boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::edge_descriptor |
The edge descriptor type.
typedef Config::edge_property_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::edge_property_type |
The vertex property type.
typedef internal_vertex_name<vertex_property_type>::type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::extract_name_type |
The type used to extract names from the property structure.
typedef named_graph boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_graph_type |
a reference to this class, which is used for disambiguation of the
typedef Config::process_group_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::process_group_type |
The type used for communication in the distributed structure.
typedef process_group_type::process_id_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::process_id_type |
Type used to identify processes.
typedef Vertex boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::vertex_descriptor |
The vertex descriptor type.
typedef remove_cv< typename remove_reference< typename extract_name_type::result_type>::type>::type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::vertex_name_type |
The type used to name vertices in the graph.
typedef Config::vertex_property_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::vertex_property_type |
The vertex property type.
enum boost::graph::distributed::named_graph::message_kind |
Messages passed within the distributed named graph.
Enumerator | |
---|---|
msg_add_vertex_name |
Requests the addition of a vertex on a remote processor. The message data is a |
msg_add_vertex_name_with_reply |
Requests the addition of a vertex on a remote processor. The message data is a |
msg_find_vertex |
Requests the vertex descriptor corresponding to the given vertex name. The remote process will reply with a |
msg_add_edge_name_name |
Requests the addition of an edge on a remote processor. The data stored in these messages is a |
msg_add_edge_vertex_name | |
msg_add_edge_name_vertex | |
msg_add_edge_name_name_with_reply |
These messages are identical to msg_add_edge_*_*, except that the process actually adding the edge will send back a |
msg_add_edge_vertex_name_with_reply | |
msg_add_edge_name_vertex_with_reply | |
msg_add_edge_name_name_with_property |
Requests the addition of an edge with a property on a remote processor. The data stored in these messages is a |
msg_add_edge_vertex_name_with_property | |
msg_add_edge_name_vertex_with_property | |
msg_add_edge_name_name_with_reply_and_property |
These messages are identical to msg_add_edge_*_*_with_property, except that the process actually adding the edge will send back a |
msg_add_edge_vertex_name_with_reply_and_property | |
msg_add_edge_name_vertex_with_reply_and_property |
|
explicit |
Construct the named_graph with a particular process group.
References boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::setup_triggers().
boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_graph | ( | const process_group_type & | pg, |
const base_distribution_type & | distribution | ||
) |
Construct the named_graph mixin with a particular process group and distribution function.
References boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::setup_triggers().
|
inline |
Notify the named_graph that we have added the given vertex.
This is a no-op.
|
inline |
Notify the named_graph that we are clearing the graph.
|
inline |
Retrieve the derived instance.
|
inline |
|
protected |
References boost::graph::distributed::add_edge().
|
protected |
References boost::graph::distributed::add_edge().
|
protected |
boost::parallel::detail::untracked_pair<typename named_graph<Graph, Vertex, Edge, Config>::edge_descriptor, bool> boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_edge_with_reply | ( | int | source, |
int | , | ||
const boost::parallel::detail::untracked_pair< U, V > & | msg, | ||
trigger_receive_context | |||
) |
References boost::graph::distributed::add_edge(), and boost::multiprecision::backends::p.
|
protected |
boost::parallel::detail::untracked_pair<typename named_graph<Graph, Vertex, Edge, Config>::edge_descriptor, bool> boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_edge_with_reply_and_property | ( | int | source, |
int | tag, | ||
const pair_with_property< U, V, edge_property_type > & | msg, | ||
trigger_receive_context | |||
) |
References boost::graph::distributed::add_edge(), and boost::multiprecision::backends::p.
|
protected |
|
protected |
|
protected |
|
inline |
|
inline |
named_graph< Graph, Vertex, Edge, Config >::process_id_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::owner_by_property | ( | const vertex_property_type & | property | ) |
Retrieve the owner of a given vertex based on the properties associated with that vertex.
This operation just returns the number of the local processor, adding all vertices locally.
|
inline |
Retrieve the process group.
|
inline |
|
inline |
Notify the named_graph that we are removing the given vertex.
This is a no-op.
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::setup_triggers | ( | ) |
Set up triggers, but only for the BSP process group.
References boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_vertex_name(), boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_vertex_name_with_reply(), boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_find_vertex(), boost::parallel::simple_trigger(), and template.
Referenced by boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_graph().
|
friend |
|
friend |
|
friend |
|
protected |
The distribution we will use to map names to processors.
Referenced by boost::graph::distributed::maybe_named_graph< adjacency_list< OutEdgeListS, distributedS< ProcessGroup, InVertexListS, InDistribution >, DirectedS, VertexProperty, EdgeProperty, GraphProperty, EdgeListS >, adjacency_list_traits< OutEdgeListS, distributedS< ProcessGroup, InVertexListS, InDistribution >, DirectedS >::vertex_descriptor, adjacency_list_traits< OutEdgeListS, distributedS< ProcessGroup, InVertexListS, InDistribution >, DirectedS >::edge_descriptor, detail::parallel::adjacency_list_config< OutEdgeListS, ProcessGroup, InVertexListS, InDistribution, DirectedS, VertexProperty, EdgeProperty, GraphProperty, EdgeListS > >::distribution(), boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, void >::distribution(), and boost::graph::distributed::named_graph< adjacency_list< OutEdgeListS, distributedS< ProcessGroup, InVertexListS, InDistribution >, DirectedS, VertexProperty, EdgeProperty, GraphProperty, EdgeListS >, adjacency_list_traits< OutEdgeListS, distributedS< ProcessGroup, InVertexListS, InDistribution >, DirectedS >::vertex_descriptor, adjacency_list_traits< OutEdgeListS, distributedS< ProcessGroup, InVertexListS, InDistribution >, DirectedS >::edge_descriptor, detail::parallel::adjacency_list_config< OutEdgeListS, ProcessGroup, InVertexListS, InDistribution, DirectedS, VertexProperty, EdgeProperty, GraphProperty, EdgeListS > >::named_distribution().
|
protected |