Basic question about using remove_edge() in boost graph library
Dear boost-users:
I just start learning boost graph library and have a basic problem on using
the remove_edge function in boost graph library.
I would like to remove an edge in a multigraph. For a graph with two edges
connect vertice 0 and 1, I would like to remove one of them, but kept the
other.
According to the user guide, remove_edge(u ,v , g) removes all occurrences
of (u ,v). So I should use remove_edge(e ,g) instead. Here, e is a valid
edge descriptor.
For a single graph, g, I am able to perform both remove_edge(u ,v , g) and
remove_edge(e ,g) operation.
However, when I want to generalize the implementation to fit my need by
putting graphs in a vector container, I got segmentation fault for
remove_edge(e ,graph_list[0]).
I really want to make remove_edge(e,g) and vector container work at the
same time. So any suggestion that can help my bypass this difficulty is
appreciated.
Thanks a lot!!
Yi-Ping
*************************Here is the complete code*************************
#include <iostream>
#include <utility>
#include <algorithm>
#include <vector>
#include "boost/graph/graph_traits.hpp"
#include "boost/graph/adjacency_list.hpp"
using namespace boost;
typedef adjacency_list
participants (1)
-
Yi-Ping Huang