On Feb 8, 2005, at 5:08 PM, Gordon Smith wrote:
The following example produces the following (unexpected results): name: graph name: subgraph 1 name sg2: subgraph 2 name sg: subgraph 2
Do subgraphs share the same property_map?
Sometimes. Vertex and edge properties are *not* shared: each subgraph has a separate copy of these internal properties. Graph properties *are* shared, as your example proves. The get_property code in the subgraph header explicitly references the root of the subgraph when accessing graph properties. Personally, I think this is completely backward. The vertices and edges of a (conceptual) subgraph are the same vertices and edges of the graph itself, so they should be the same and have the same properties; this is the problem that Jeffrey Holle is referring to. But, each subgraph is in essence a different graph, so it should have its own graph properties; this is the unexpected behavior you've run into. Doug