| 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. |
| Name | Expression | Return Type | Description |
|---|---|---|---|
| Add Edge | add_edge(g, u, v) | std::pair<edge_descriptor, bool> | Inserts the edge (u,v) into the graph. |
| Remove Edge | remove_edge(g, u, v) | void |
Remove the edge (u,v) from the graph. If the
graph allows parallel edges this remove all occurances of
(u,v). Precondition: u and v are vertices in the graph. Postcondition: (u,v) is no longer in the edge set for g. |
| Remove Edge | remove_edge(g, e) | void | Remove the edge e from the graph. Precondition: e is an edge in the graph. Postcondition: e is no longer in the edge set for g. |
| Add Vertex | add_vertex(g) | vertex_descriptor | Add a new vertex to the graph. The vertex_descriptor for the new vertex is returned. |
| Clear Vertex | clear_vertex(g, u) | void |
Remove all edges to and from vertex u from the graph. Precondition: u is a valid vertex descriptor of g. Postcondition: u does not appear as a source or target of any edge in g. |
| Remove Vertex | remove_vertex(g, u) | void |
Remove u from the vertex set of the graph. Note that undefined
behaviour may result if there are edges remaining in the graph who's
target is u. Typically the clear_vertex() function
should be called first. Precondition: u is a valid vertex descriptor of g. Postcondition: num_vertices(g) is one less, u no longer appears in the vertex set of the graph and it is no longer a valid vertex descriptor. |
template <class G>
struct MutableGraph_concept
{
typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor;
void constraints() {
v = add_vertex(g);
clear_vertex(g, v);
remove_vertex(g, v);
p = add_edge(g, u, v);
remove_edge(g, u, v);
remove_edge(g, e);
}
G g;
edge_descriptor e;
std::pair<edge_descriptor, bool> p;
typename boost::graph_traits<G>::vertex_descriptor u, v;
};
| Copyright © 2000 | Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) |