Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Trying to use subgraph
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-05-26 18:29:44


> As long as you're making changes to subgraph anyway, something that really
> bugs me about it is the necessity to make the root graph itself be of
> subgraph type. While I can understand the reasoning, it would be nice if
> there were a way to simply make the root be a shallow wrapper around any
> particular graph.
>
> I don't know how feasible this is, but I figured I'd ask.
>

It may be possible, but I'm not thinking too much about it right now.

I've just committed the beginning of this work. Now you can write:

g[v] -> returns the global bundle of v
g[global(v)] -> returns the global bundle for v
g[local(v)] -> returns the local bundle of v

typedef property_map<
  Subgraph, local_subgraph_property<int Node::*>
>::type Map;
Map pm = get(local(&Node::weight), g);

I'm not fully sold on the local_subgraph_property name. I could probably
shorten it to local_property, and it would work just as well.

I haven't built explicit support for global bundled properties, and I need
to extend the same support to the old-style properties.

Thoughts?

Andrew Sutton
andrew.n.sutton_at_[hidden]



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