Boost logo

Boost Users :

Subject: Re: [Boost-users] Graphviz and Boost Problem
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-09-03 22:53:13


On Fri, 3 Sep 2010, ef wrote:

>  Hello
>
> I am using the dot language to create a graph using Boost. My Graphs are huge and I am trying to delete vertices and edges that are no
> longer used in my program.
> Under boost/graph/graphviz.hpp I added a function to remove a vertex  and its edges in the mutate_graph class, I then go ahead and
> implement it under the mutate_graph_impl class:
>     virtual void
>   do_remove_vertex( const node_t& node)
>   {
>     bgl_vertex_t v = bgl_nodes[node];
>     clear_vertex(v,graph_);
>     remove_vertex(v,graph_);
>   }

Why are you deleting vertices while reading the Graphviz file itself and
not afterwards?

> However I keep getting a segfault on the call to clear vertex, I ran it
> into gdb and here is the back trace (i hope this is not to long)

Does your graph contain self-loops? If so, you might be hitting
<URL:https://svn.boost.org/trac/boost/ticket/4622>. This bug is fixed
in the Boost trunk.

-- 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