#include #include using namespace boost; using namespace std; typedef adjacency_list Graph; int main() { Graph g; graph_traits::vertex_descriptor v[4]; for (int i = 0; i < 4; ++i) v[i] = add_vertex(g); add_edge(v[0],v[1],g); add_edge(v[1],v[2],g); add_edge(v[2],v[0],g); add_edge(v[0],v[3],g); // add parallel edge graph_traits::edge_descriptor e; e = add_edge(v[0],v[1],g).first; cout << "number of edges before removal: " << num_edges(g) << endl; remove_edge(e,g); cout << "number of edges after removal: " << num_edges(g) << endl; return 0; }