Boost logo

Boost Users :

Subject: Re: [Boost-users] Can't link subgraphs because remove_vertex is a TODO
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-10-19 17:14:31


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


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