MutablePropertyGraph
A MutablePropertyGraph is a MutableGraph with properties attached
internally to the vertices and edges. When adding vertices and edges
the value of the properties can be given.
Refinement of
MutableGraph
Notation
| 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_plugin_type |
| vp | is an object of type G::vertex_plugin_type |
Associated Types
| Edge Plugin Type |
graph_traits<G>::edge_plugin_type |
| Vertex Plugin Type |
graph_traits<G>::vertex_plugin_type |
Valid Expressions
| Add Edge with Property Data |
add_edge(g, u, v, ep) |
std::pair<edge_descriptor, bool> |
Inserts the edge (u,v) into the graph, and
copies object ep into the property plugin for that edge. |
| Add Vertex with Property Data |
add_vertex(g, vp) |
vertex_descriptor |
Add a new vertex to the graph and copy vp into the property
plugin for the new vertex. The vertex_descriptor for the new
vertex is returned.
|
Models
template <class G>
struct MutablePropertyGraph_concept
{
typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
void constraints() {
REQUIRE(G, MutableGraph);
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_plugin_type vp;
typename boost::graph_traits<G>::edge_plugin_type ep;
};