...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
G | A type that is a model of Graph. |
g | An object of type G. |
e | An object of type boost::graph_traits |
u,v | are objects of type boost::graph_traits |
ep | is an object of type G::edge_property_type |
vp | is an object of type G::vertex_property_type |
Edge Property Type | graph_traits |
Vertex Property Type | graph_traits |
add_edge(u, v, ep, g) | Inserts the edge (u,v) into the graph, and
copies object ep into the property for that edge. Return type: std::pair |
add_vertex(vp, g) |
Add a new vertex to the graph and copy vp into the
property for the new vertex. The vertex_descriptor for the new
vertex is returned. Return type: vertex_descriptor |
templatestruct MutablePropertyGraphConcept { typedef typename boost::graph_traits ::edge_descriptor edge_descriptor; void constraints() { BOOST_CONCEPT_ASSERT(( MutableGraphConcept )); v = add_vertex(vp, g); p = add_edge(u, v, ep, g); } G g; std::pair p; typename boost::graph_traits ::vertex_descriptor u, v; typename boost::graph_traits ::vertex_property_type vp; typename boost::graph_traits ::edge_property_type ep; };
Copyright © 2000-2001 | Jeremy Siek, Indiana University (jsiek@osl.iu.edu) |