Boost logo

Boost Users :

Subject: Re: [Boost-users] Dynamic Properties and Removing Edges/Vertex
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-08-18 14:48:18

On Wed, 18 Aug 2010, ef wrote:

> Hello,
> I am pretty new and inexperienced so forgive me if any of this is incorrect, any corrections would be appreciated.
> I am currently using Dot/Graphviz libaries of boost to create a graph. However my graph is huge, to the point where memory will run out. I have devised an
> algorithm to remove edges/and vertex that are unused when I am done with them.
> When an vertex/edge is added using read_graphviz function the following happens:
> the vertex/edge is added to some data structures, as well as the function add_vertex and add_edge are called.
> I think memory management is pretty straight forward for those situation.
> The issues that I think will be of some concern is that in order to map names and properties of these vertex, data is added via dynamic properties. From what I
> have seen there is no way of removing information from these dynamic properties. (So even if I remove the vertex/edges there is still some residue left in the
> dp).
> My question is this correct? Are there functions to remove a certain vertex/edge dynamic property or is this done using the function remove_vertex/edge. From the
> source code I have seen there is no such thing.
> Do I need to edit the dynamic property class and make a special delete function, or am I incorrect in my thinking?

The dynamic_properties class does not store the property values
themselves, just references to the underlying property maps in your graph.
Thus, removing a vertex or edge from the graph will remove it from the
dynamic_properties structure automatically.

-- Jeremiah Willcock

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at