Boost logo

Boost Users :

From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2008-02-06 09:41:00


Hi Aaron,

thanks for your hint and sorry for the spam - I did not think of
checking the current bug list on the wiki. Next time.

Greetings,

Sebastian

On Wed, 2008-02-06 at 08:53 -0500, Aaron Windsor wrote:
> On Feb 6, 2008 4:39 AM, Sebastian Weber
> <sebastian.weber_at_[hidden]> wrote:
> > Hi everyone!
> >
> > I think I've hit a but in the remove_edge(u,v,bg) function in case I
> > want to delete a self-edge. The following code crashes on my machine:
> >
> > using namespace boost;
> > typedef adjacency_list<vecS, vecS, undirectedS > ubase_graph_t;
> >
> > ubase_graph_t bg(5);
> >
> > add_edge(0, 1, bg);
> > add_edge(1, 2, bg);
> > add_edge(3, 4, bg);
> > add_edge(4, 0, bg);
> > add_edge(2, 2, bg);
> >
> > remove_edge(2, 2, bg);
> >
> > However, deleting via edge_descriptors is working:
> >
> > BGL_FORALL_OUTEDGES(2, ed, bg, ubase_graph_t) {
> > if(target(ed, bg) == 2) {
> > remove_edge(ed, bg);
> > break;
> > }
> > }
> >
> > So what is wrong with remove_edge(u, u, bg) if there is a self-edge?
>
> Hi Sebastian,
>
> I can recreate the bug you're describing - this problem was actually
> brought up a year ago as well, see:
> http://lists.boost.org/Archives/boost/2007/02/116438.php. My reply to
> that message describes what's going on. I've put in a ticket in for
> this: http://svn.boost.org/trac/boost/ticket/1622. It won't be fixed
> for 1.35, but should be fixed by the next release. Unfortunately, the
> only workaround I can suggest is the one you've already discovered -
> removing by edge descriptor.
>
> Regards,
> Aaron
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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