Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Trying to use subgraph
From: Lindley M French (lfrench1_at_[hidden])
Date: 2009-05-22 13:07:58


The intention with regards to properties was never all that clear to me from the documentation, to be honest.

I *thought* that each subgraph would have a local copy of all properties (as they were at subgraph creation time) and the modifying these would not change the properties of the corresponding global vertex/edge, and my code actually relies on this.

Am I going to have to change my code design, either to accommodate the current design or a future fix?

>
> FYI, the 2-argument version of add_vertex doesn't work on subgraphs. I
>> suspect the same is true of the other functions that take properties
>> objects.
>>
>
> That doesn't surprise me. I noticed that subgraph was failing one of the
> property tests in my new test harness just before I left school. I probably
> won't have a chance to take a good look why until Friday.
>

After some digging (and trying to implement add_vertex(vp, g) for
subgraphs), it turns out that that the bundled property support for
subgraphs seems to be fundamentally broken - sorry Dmitry :) The fault
really lies, I think, with the design of the subgraph class w.r.t.
properties. Discussion follows:

Every subgraph object keeps a pointer to its parent (the object being
subgraphed) and a local graph. The problem is that the local is also
declared to store the properties of the global graph so there are lots of
places where property values could be applied to both vertices and edges.

With non-bundled properties, the subgraph uses a speciialized property map
that delegates requests for properties to the root graph. We probably need
to duplicate this effort for bundled proprties. I'm going to reopen the
ticket that was closed 4 years ago (#380).

If anybody wants to take a stab at this, that would be great :) Otherwise,
I'll probably work on this on Monday.

Andrew Sutton
andrew.n.sutton_at_[hidden]


_______________________________________________
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