Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] graph serialization
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-04-19 14:46:52


On Mon, 19 Apr 2010, Damien Maupu wrote:

> Dear all,
>
> I have a graph with edge property is a smart pointer to myEdge class.
> I want to save my graph and choose the serialization option.
> Saving the graph seems to work (if exporter to a text file I can see that
> information is there).
> Unfortunately, loading the graph fails as no edges are loaded.
> In facts, the edge data is loaded (if I stop the debugger to the edge
> serialization info seems to come) but not added to the graph.
>
> In file adj_list_serialize.hpp
> Ln 95: tie(e,inserted) = add_edge(verts[u], verts[v], graph);
> Boolean "inserted" is true but still no edge is added to my graph m_edges
> array (size keep to be 0).

I'm not sure m_edges is always up to date. Could you please check
num_edges(graph) instead? You might need to write a call to it in your
program for it to be instantiated for the debugger to use.

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