|
Boost Users : |
Subject: [Boost-users] [BGL] How to set a complex edge property using add_edge
From: Cosimo Calabrese (cosimo.calabrese_at_[hidden])
Date: 2009-11-05 06:24:16
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.
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