Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] How to set a complex edge property using add_edge
From: Geoff Hilton (geoff.hilton_at_[hidden])
Date: 2009-11-05 12:13:01


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 )


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