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>


Public Types | |
| typedef internal_vertex_name < VertexProperty >::type | extract_name_type |
| The type of the function object that extracts names from vertex properties. More... | |
| typedef lookup_one_property < VertexProperty, vertex_bundle_t >::type | bundled_vertex_property_type |
| The type of the "bundled" property, from which the name can be extracted. More... | |
| typedef internal_vertex_constructor < VertexProperty >::type | vertex_constructor_type |
| The type of the function object that generates vertex properties from names, for the implicit addition of vertices. 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 Vertex | vertex_descriptor |
| The type of vertex descriptors in the graph. More... | |
| typedef multi_index::multi_index_container < Vertex, multi_index::indexed_by < multi_index::hashed_unique < multi_index::tag < vertex_name_t > , extract_name_from_vertex > > > | named_vertices_type |
| The type that maps names to vertices. More... | |
| typedef named_vertices_type::template index< vertex_name_t >::type | vertices_by_name_type |
| The set of vertices, indexed by name. More... | |
Public Member Functions | |
| named_graph (const extract_name_type &extract=extract_name_type(), const vertex_constructor_type &vertex_constructor=vertex_constructor_type()) | |
| Construct an instance of the named graph mixin, using the given function object to extract a name from the bundled property associated with a vertex. More... | |
| void | added_vertex (Vertex vertex) |
| Notify the named_graph that we have added the given vertex. More... | |
| template<typename VertexIterStability > | |
| void | removing_vertex (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... | |
| Graph & | derived () |
| Retrieve the derived instance. More... | |
| const Graph & | derived () const |
| extract_name_type::result_type | extract_name (const bundled_vertex_property_type &property) |
| Extract the name from a vertex property instance. More... | |
| optional< vertex_descriptor > | vertex_by_property (const bundled_vertex_property_type &property) |
| Search for a vertex that has the given property (based on its name) More... | |
Public Attributes | |
| named_vertices_type | named_vertices |
| Mapping from names to vertices. More... | |
| vertex_constructor_type | vertex_constructor |
| Constructs a vertex from the name of that vertex. More... | |
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 stored with each vertex in the Graph.
| typedef lookup_one_property<VertexProperty, vertex_bundle_t>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::bundled_vertex_property_type |
The type of the "bundled" property, from which the name can be extracted.
| typedef internal_vertex_name<VertexProperty>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::extract_name_type |
The type of the function object that extracts names from vertex properties.
| typedef multi_index::multi_index_container< Vertex, multi_index::indexed_by< multi_index::hashed_unique<multi_index::tag<vertex_name_t>, extract_name_from_vertex> > > boost::graph::named_graph< Graph, Vertex, VertexProperty >::named_vertices_type |
The type that maps names to vertices.
| typedef internal_vertex_constructor<VertexProperty>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_constructor_type |
The type of the function object that generates vertex properties from names, for the implicit addition of vertices.
| typedef Vertex boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_descriptor |
The type of vertex descriptors in the graph.
| typedef remove_cv< typename remove_reference< typename extract_name_type::result_type>::type>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_name_type |
The type used to name vertices in the graph.
| typedef named_vertices_type::template index<vertex_name_t>::type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertices_by_name_type |
The set of vertices, indexed by name.
| boost::graph::named_graph< Graph, Vertex, VertexProperty >::named_graph | ( | const extract_name_type & | extract = extract_name_type(), |
| const vertex_constructor_type & | vertex_constructor = vertex_constructor_type() |
||
| ) |
Construct an instance of the named graph mixin, using the given function object to extract a name from the bundled property associated with a vertex.
|
inline |
Notify the named_graph that we have added the given vertex.
The name of the vertex will be added to the mapping.
|
inline |
Notify the named_graph that we are clearing the graph.
This will clear out all of the name->vertex mappings
|
inline |
Retrieve the derived instance.
|
inline |
| named_graph< Graph, Vertex, VertexProperty >::extract_name_type::result_type boost::graph::named_graph< Graph, Vertex, VertexProperty >::extract_name | ( | const bundled_vertex_property_type & | property | ) |
Extract the name from a vertex property instance.
|
inline |
Notify the named_graph that we are removing the given vertex.
The name of the vertex will be removed from the mapping.
References BOOST_STATIC_ASSERT_MSG, boost::program_options::value(), and boost::vertex_name.
| optional< typename named_graph< Graph, Vertex, VertexProperty >::vertex_descriptor > boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_by_property | ( | const bundled_vertex_property_type & | property | ) |
Search for a vertex that has the given property (based on its name)
References boost::graph::find_vertex().
| named_vertices_type boost::graph::named_graph< Graph, Vertex, VertexProperty >::named_vertices |
Mapping from names to vertices.
| vertex_constructor_type boost::graph::named_graph< Graph, Vertex, VertexProperty >::vertex_constructor |
Constructs a vertex from the name of that vertex.