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::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName > Struct Template Reference

A graph mixin that can provide a mapping from names to vertices, and use that mapping to simplify creation and manipulation of graphs. More...

#include <named_graph.hpp>

Inheritance diagram for boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >:
Collaboration diagram for boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >:

Public Types

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
 
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
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

 maybe_named_graph (const process_group_type &pg)
 
 maybe_named_graph (const process_group_type &pg, const base_distribution_type &distribution)
 
distribution_typedistribution ()
 
const distribution_typedistribution () const
 
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...
 

Detailed Description

template<typename Graph, typename Vertex, typename Edge, typename Config, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
struct boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >

A graph mixin that can provide a mapping from names to vertices, and use that mapping to simplify creation and manipulation of graphs.

Member Typedef Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
typedef Config::base_distribution_type boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >::base_distribution_type
template<typename Graph, typename Vertex, typename Edge, typename Config, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
typedef Config::distribution_type boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >::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
inherited

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
inherited

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
inherited

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
inherited

a reference to this class, which is used for disambiguation of the

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
inherited

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
inherited

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
inherited

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
inherited

The vertex property type.

Member Enumeration Documentation

template<typename Graph, typename Vertex, typename Edge, typename Config>
enum boost::graph::distributed::named_graph::message_kind
inherited

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, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >::maybe_named_graph ( const process_group_type pg)
inlineexplicit
template<typename Graph, typename Vertex, typename Edge, typename Config, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >::maybe_named_graph ( const process_group_type pg,
const base_distribution_type distribution 
)
inline

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  )
inlineinherited

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 ( )
inlineinherited

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 ( )
inlineinherited

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
inlineinherited
template<typename Graph, typename Vertex, typename Edge, typename Config, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
distribution_type& boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >::distribution ( )
inline
template<typename Graph, typename Vertex, typename Edge, typename Config, typename ExtractName = typename internal_vertex_name<typename Config::vertex_property_type>::type>
const distribution_type& boost::graph::distributed::maybe_named_graph< Graph, Vertex, Edge, Config, ExtractName >::distribution ( ) 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   
)
protectedinherited
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   
)
protectedinherited
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   
)
protectedinherited
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   
)
inherited
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   
)
protectedinherited
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   
)
inherited
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   
)
protectedinherited
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   
)
protectedinherited
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   
)
protectedinherited
template<typename Graph, typename Vertex, typename Edge, typename Config>
distribution_type& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_distribution ( )
inlineinherited
template<typename Graph, typename Vertex, typename Edge, typename Config>
const distribution_type& boost::graph::distributed::named_graph< Graph, Vertex, Edge, Config >::named_distribution ( ) const
inlineinherited
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)
inherited

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 ( )
inlineinherited

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
inlineinherited
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   
)
inlineinherited

Notify the named_graph that we are removing the given vertex.

This is a no-op.

Member Data Documentation

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

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