G | A type that is a model of Graph. |
g | An object of type G. |
e | An object of type boost::graph_traits<G>::edge_descriptor. |
u,v | are objects of type boost::graph_traits<G>::vertex_descriptor. |
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<G>::edge_property_type |
Vertex Property Type | graph_traits<G>::vertex_property_type |
add_edge(g, u, v, ep) | Inserts the edge (u,v) into the graph, and
copies object ep into the property property for that edge. Return type: std::pair<edge_descriptor, bool> |
add_vertex(g, vp) |
Add a new vertex to the graph and copy vp into the property
property for the new vertex. The vertex_descriptor for the new
vertex is returned. Return type: vertex_descriptor |
template <class G> struct MutablePropertyGraphConcept { typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor; void constraints() { function_requires< MutableGraphConcept<G> >(); v = add_vertex(g, vp); p = add_edge(g, u, v, ep); } G g; std::pair<edge_descriptor, bool> p; typename boost::graph_traits<G>::vertex_descriptor u, v; typename boost::graph_traits<G>::vertex_property_type vp; typename boost::graph_traits<G>::edge_property_type ep; };
Copyright © 2000 | Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) |