Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config > Class Template Reference

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>

Inheritance diagram for boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >:

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_typeprocess_group ()
 Retrieve the process group. More...
 
const process_group_typeprocess_group () const
 
distribution_typenamed_distribution ()
 
const distribution_typenamed_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
 

Detailed Description

template<typename Graph, typename Vertex, typename Edge, typename Config>
class boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >

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.

Member Typedef Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config>
typedef Config::base_distribution_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::base_distribution_type
template<typename Graph, typename Vertex, typename Edge, typename Config>
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.

template<typename Graph, typename Vertex, typename Edge, typename Config>
typedef Edge boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::edge_descriptor

The edge descriptor type.

template<typename Graph, typename Vertex, typename Edge, typename Config>
typedef Config::edge_property_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::edge_property_type

The vertex property type.

template<typename Graph, typename Vertex, typename Edge, typename Config>
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.

template<typename Graph, typename Vertex, typename Edge, typename Config>
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

template<typename Graph, typename Vertex, typename Edge, typename Config>
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.

template<typename Graph, typename Vertex, typename Edge, typename Config>
typedef process_group_type::process_id_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::process_id_type

Type used to identify processes.

template<typename Graph, typename Vertex, typename Edge, typename Config>
typedef Vertex boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::vertex_descriptor

The vertex descriptor type.

template<typename Graph, typename Vertex, typename Edge, typename Config>
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.

template<typename Graph, typename Vertex, typename Edge, typename Config>
typedef Config::vertex_property_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::vertex_property_type

The vertex property type.

Member Enumeration Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config>
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 vertex_name_type.

msg_add_vertex_name_with_reply 

Requests the addition of a vertex on a remote processor.

The message data is a vertex_name_type. The remote processor will send back a msg_add_vertex_name_reply message containing the vertex descriptor.

msg_find_vertex 

Requests the vertex descriptor corresponding to the given vertex name.

The remote process will reply with a msg_find_vertex_reply message containing the answer.

msg_add_edge_name_name 

Requests the addition of an edge on a remote processor.

The data stored in these messages is a pair<source, target>@, where source and target may be either names (of type vertex_name_type) or vertex descriptors, depending on what information we have locally.

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 pair<edge_descriptor,bool>

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 pair<vertex_property_type, pair<source, target>>@, where source and target may be either names (of type vertex_name_type) or vertex descriptors, depending on what information we have locally.

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 pair<edge_descriptor,bool>.

msg_add_edge_vertex_name_with_reply_and_property 
msg_add_edge_name_vertex_with_reply_and_property 

Constructor & Destructor Documentation

template<typename Graph , typename Vertex , typename Edge , typename Config >
boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_graph ( const process_group_type pg)
explicit
template<typename Graph , typename Vertex , typename Edge , typename Config >
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().

Member Function Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config>
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::added_vertex ( Vertex  )
inline

Notify the named_graph that we have added the given vertex.

This is a no-op.

template<typename Graph, typename Vertex, typename Edge, typename Config>
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::clearing_graph ( )
inline

Notify the named_graph that we are clearing the graph.

template<typename Graph, typename Vertex, typename Edge, typename Config>
Graph& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::derived ( )
inline

Retrieve the derived instance.

template<typename Graph, typename Vertex, typename Edge, typename Config>
const Graph& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::derived ( ) const
inline
template<typename Graph , typename Vertex , typename Edge , typename Config >
template<typename U , typename V >
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_edge ( int  source,
int  tag,
const boost::parallel::detail::untracked_pair< U, V > &  msg,
trigger_receive_context   
)
protected
template<typename Graph , typename Vertex , typename Edge , typename Config >
template<typename U , typename V >
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_edge_with_property ( int  source,
int  tag,
const pair_with_property< U, V, edge_property_type > &  msg,
trigger_receive_context   
)
protected
template<typename Graph, typename Vertex, typename Edge, typename Config>
template<typename U , typename V >
boost::parallel::detail::untracked_pair<edge_descriptor, bool> boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_edge_with_reply ( int  source,
int  tag,
const boost::parallel::detail::untracked_pair< U, V > &  msg,
trigger_receive_context   
)
protected
template<typename Graph, typename Vertex, typename Edge, typename Config>
template<typename U , typename V >
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   
)
template<typename Graph, typename Vertex, typename Edge, typename Config>
template<typename U , typename V >
boost::parallel::detail::untracked_pair<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   
)
protected
template<typename Graph, typename Vertex, typename Edge, typename Config>
template<typename U , typename V >
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   
)
template<typename Graph , typename Vertex , typename Edge , typename Config >
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_vertex_name ( int  source,
int  tag,
const vertex_name_type msg,
trigger_receive_context   
)
protected
template<typename Graph , typename Vertex , typename Edge , typename Config >
named_graph< Graph, Vertex, Edge, Config >::vertex_descriptor boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_add_vertex_name_with_reply ( int  source,
int  tag,
const vertex_name_type msg,
trigger_receive_context   
)
protected
template<typename Graph , typename Vertex , typename Edge , typename Config >
boost::parallel::detail::untracked_pair< typename named_graph< Graph, Vertex, Edge, Config >::vertex_descriptor, bool > boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::handle_find_vertex ( int  source,
int  tag,
const vertex_name_type msg,
trigger_receive_context   
)
protected
template<typename Graph, typename Vertex, typename Edge, typename Config>
distribution_type& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_distribution ( )
inline
template<typename Graph, typename Vertex, typename Edge, typename Config>
const distribution_type& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_distribution ( ) const
inline
template<typename Graph , typename Vertex , typename Edge , typename Config >
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.

template<typename Graph, typename Vertex, typename Edge, typename Config>
process_group_type& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::process_group ( )
inline

Retrieve the process group.

template<typename Graph, typename Vertex, typename Edge, typename Config>
const process_group_type& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::process_group ( ) const
inline
template<typename Graph, typename Vertex, typename Edge, typename Config>
template<typename VertexIterStability >
void boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::removing_vertex ( Vertex  ,
VertexIterStability   
)
inline

Notify the named_graph that we are removing the given vertex.

This is a no-op.

Friends And Related Function Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config>
friend struct lazy_add_edge
friend
template<typename Graph, typename Vertex, typename Edge, typename Config>
friend struct lazy_add_edge_with_property
friend
template<typename Graph, typename Vertex, typename Edge, typename Config>
friend struct lazy_add_vertex
friend

Member Data Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config>
distribution_type boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::distribution_
protected

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