[BGL] How to set a complex edge property using add_edge

Hi to all, I'm trying to use the add_edge( u, v, *p*, g ) overload of this function, but I've founded only example where the edge property of the graph is a single property. // ... typedef adjacency_list<vecS, vecS, directedS, no_property, property<edge_weight_t, int> > Graph; Graph g( 10 ); // add an edge with weight = 1 property<edge_weight_t, int> edge_property( 1 ); add_edge( 0, 1, edge property, g); // ... What about if I've multiple edge property? // ... typedef property < edge_ID_t, long, property < edge_weight_t, long, property < edge_other_prop_t, bool > > > edge_prop; typedef adjacency_list<vecS, vecS, directedS, no_property, edge_prop> Graph; // ... How can I set an edge_prop variable with all the edge properties? Thanks in advance, Cosimo Calabrese.

Cosimo Calabrese wrote:
Hi to all,
I'm trying to use the add_edge( u, v, *p*, g ) overload of this function, but I've founded only example where the edge property of the graph is a single property.
// ... typedef adjacency_list<vecS, vecS, directedS, no_property, property<edge_weight_t, int> > Graph; Graph g( 10 ); // add an edge with weight = 1 property<edge_weight_t, int> edge_property( 1 ); add_edge( 0, 1, edge property, g); // ...
What about if I've multiple edge property?
// ... typedef property < edge_ID_t, long, property < edge_weight_t, long, property < edge_other_prop_t, bool > > > edge_prop; typedef adjacency_list<vecS, vecS, directedS, no_property, edge_prop> Graph; // ...
How can I set an edge_prop variable with all the edge properties?
Thanks in advance, Cosimo Calabrese. look up bundled properties ( http://www.boost.org/doc/libs/1_40_0/libs/graph/doc/bundles.html )
participants (2)
-
Cosimo Calabrese
-
Geoff Hilton