On Tue, 19 Oct 2010, Trevor Harmon wrote:
On Oct 19, 2010, at 9:20 AM, Jeremiah Willcock wrote:
What exactly are you trying to do with subgraphs? Maybe there is another way to do it that doesn't hit these problems.
I'm trying to link two subgraphs in such a way that requires vertex removal. Attached are two PDFs showing the "before" and "after" for a simple example. Note that the entry and exit vertices (4 and 5) are removed.
Are you doing this process once, or iteratively? I.e., do you merge the results of merging rather than just merging disjoint parts of the original graph? Is there a standard name for the algorithm you're trying to implement so I can read about it in detail?
Luckily, the remove_edge method works for subgraphs, so I'm able to rewire the edges as illustrated. Although this leaves the unremovable vertices dangling, they are effectively removed from all traversal algorithms. However, I do have to add some special case code to skip them whenever I output the graph data.
You can use filtered_graph for that if you feel like it; it will automatically remove those vertices.
P.S. I have created a bug report on this: https://svn.boost.org/trac/boost/ticket/4752
I saw that -- that's why the function is commented out now rather than always failing at runtime. -- Jeremiah Willcock