Subject: Re: [boost] [BGL] Multithread problem inserting edges and exploring the same graph
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-10-01 18:47:18
On Thu, 1 Oct 2009, Cosimo Calabrese wrote:
> I've just looked to the edge_descriptor definition. An edge_descriptor is
> equal to another edge_descriptor if and only if they have the same source and
> target (from edge_base definition) and the same pointer to a property (from
> the edge_desc_impl definition).
> If the 'original graph' doesn't never involve the free vertexes, and the
> 'little graph' necessary involves the free vertexes, so an edge_descriptor of
> the original graph will not be never the same of an edge_descriptor of the
> little graph.
> If I'm sure to distinguish the edges of both the graphs, I think that I can
> implement the union_graph shortly.
> What do you think about it?
I think that should work. You might really want a tagged union type,
though (boost::variant with some guarantee that the edge descriptor types
of the two graphs are different is an example). You would need to do
wrapping of each graph's descriptors in the union iterator then, though.
That would remove the restrictions on edges that you gave above. I don't
know what you need as far as properties; those might need to be combined
-- Jeremiah Willcock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk