Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Trying to use subgraph
From: Lindley M French (lfrench1_at_[hidden])
Date: 2009-05-23 16:40:14

Hmm....I'll download that file and give it a try on Monday.

I don't fully understand property maps. Aside from vertex_index, I haven't used get() for anything directly; I usually just do

w = G[edge].edge_weight;
or similar.

And when using algorithms, I was able to figure out the property map parameters mainly be looking at what the examples did.

So using the above access pattern, how would one differentiate a subgraph with "pass-through" property access versus one with local properties?

> Incidentally, I believe there was a problem with placing edge_index_t
> edge_index in the bundled properties----it only worked when I used the (far
> uglier) joint internal/bundled property approach. Something else to put on
> the list.

I think I've run into this before. There was a problem with the
property-deducing metafunctions that was failing if you gave a formally
constructed bundle (of the form property<???_bundle_t, Bundle>). It should
be fixed in trunk. Relevant changes are in boost/graph/properties.hpp.

As far as options, I was think something like:

typedef property_map<G, local<int P::*> >::type LocalPropMap;
typedef property_map<G, global<int P::*> >::type GlobalPropMap;

So specializations on local/global will automatically select lookup logic. I
don't think I have to change anything else.

Andrew Sutton

Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at