Boost Users :
Subject: [Boost-users] [BGL] Question about using remove_edge() in boost graph library
From: Yi-Ping Huang (Yiping.Huang_at_[hidden])
Date: 2014-08-12 19:11:52
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
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
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). (The compiler show no warning message.) On
the other hand, remove_edge(u,v,g) works perfectly. I am not sure what's
the difference between those two syntax causes this problem.
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
Thanks a lot!!
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net