[graph] property_map from bundled properties in a subgraph, how?

Hi,
thanks for the great graph library! My first attempts with boost.graph were
quite successful, but now I'm stuck. My question is: How can I get a
property_map from bundled properties in a subgraph? (boost 1.34.1, g++ and
VC8)
In the beginning I had a bidirectional graph with bundled properties and I
used a property map from the edge's bundled properties:
#include

Hi! I was searching the forum/list to find a solution for my problem and found this thread. My problem is exactly the same, since I changed from adjacency_list to subgraph, I can't get my property_maps working. I searched for hours without success, so I every hint is welcomed... Christian Rössel-2 wrote:
In the beginning I had a bidirectional graph with bundled properties and I used a property map from the edge's bundled properties:
#include
#include using namespace boost; struct VertexProperty { // ... };
struct EdgeProperty { double length_; // ... };
typedef adjacency_list
Graph; int main () { Graph g; typedef property_map
::type EdgeWeightMap; EdgeWeightMap ewm = get (&EdgeProperty::length_, g); // use ewm in an algorithm ... return 0; } Everthing worked fine. Then, I had to change the graph-type from adjacency_list to subgraph ...
typedef subgraph< adjacency_list
, property > > Subgraph; int main () { Subgraph g; typedef property_map
::type EdgeWeightMap; EdgeWeightMap ewm = get (&EdgeProperty::length_, g); // use ewm in an algorithm ... return 0; } ... and got compile errors... ...
Is there a way to use property maps from bundled properties in a subgraph? If not, can you give me a hint for a workaround, please.
-- View this message in context: http://www.nabble.com/-graph--property_map-from-bundled-properties-in-a-subg... Sent from the Boost - Users mailing list archive at Nabble.com.

I was searching the forum/list to find a solution for my problem and found this thread. My problem is exactly the same, since I changed from adjacency_list to subgraph, I can't get my property_maps working.
I searched for hours without success, so I every hint is welcomed...
Unfortunately, my only attempt to use the subgraph stuff was unsuccessful, so I don't have much experience with it. Hopefully, somebody else will be able to answer this. Andrew Sutton andrew.n.sutton@gmail.com

Matthias Teich wrote:
Hi!
I was searching the forum/list to find a solution for my problem and found this thread. My problem is exactly the same, since I changed from adjacency_list to subgraph, I can't get my property_maps working.
I searched for hours without success, so I every hint is welcomed...
Hi, I was able to compile attached code with attached "boost/graph/subgraph.hpp" (it is a bit modified version of the subgraph.hpp in the boost_1_37_0). Please, try it out and let me known if everything work. Regards, Dmitry
participants (4)
-
Andrew Sutton
-
Christian Rössel
-
Dmitry Bufistov
-
Matthias Teich