
18 Dec
2008
18 Dec
'08
6:23 p.m.
on Mon Dec 08 2008, Julius Ziegler
Hello list,
I wonder what is the fastest method to access edge properties of an adjacency_list when iterating over edges. Actually, the only way I know of for accessing properties is via operator[]:
typedef boost::adjacency_list
Graph; Graph g;
for( tie( ei, ei_end ) = edges( graph ); ei != ei_end; ++ei ) { g[*ei]=something; }
IIUC that allows you to access bundled edge properties, but in the general case (where you are not depending on the properties being stored in bundles or even internally to the graph) you'd extract property maps and use get and put to do it. Either way should be equally fast. -- Dave Abrahams BoostPro Computing http://www.boostpro.com