| 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. |
| add_edge(u, v, g) |
Inserts the edge (u,v) into the graph. Return type: std::pair<edge_descriptor, bool> |
| remove_edge(u, v, g) |
Remove the edge (u,v) from the graph. If the
graph allows parallel edges this remove all occurances of
(u,v). Return type: void Precondition: u and v are vertices in the graph. Postcondition: (u,v) is no longer in the edge set for g. |
| remove_edge(e, g) | Remove the edge e from the graph. Return type: void Precondition: e is an edge in the graph. Postcondition: e is no longer in the edge set for g. |
| add_vertex(g) |
Add a new vertex to the graph. The vertex_descriptor for the
new vertex is returned. Return type: vertex_descriptor |
| clear_vertex(u, g) |
Remove all edges to and from vertex u from the graph. Return type: void 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(u, g) |
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. Return type: void 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(v, g);
remove_vertex(v, g);
p = add_edge(u, v, g);
remove_edge(u, v, g);
remove_edge(e, g);
remove_edge(iter, g);
}
G g;
edge_descriptor e;
std::pair<edge_descriptor, bool> p;
typename boost::graph_traits<G>::vertex_descriptor u, v;
typename boost::graph_traits<G>::out_edge_iterator iter;
};
| Copyright © 2000 | Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) |