How would I create a graph, such that the property map (weight of edges) is different in each property map? Is it possible to create such a property map? Like an array of property maps?
I have not seen anyone on the Internet using it, could I have an example?
Graph g(10); // graph with 10 nodes
cin>>a>>b>>weight1>>weight2>>weight3>>weight4;
and put each weight in a property map.
You can compose a property map in various ways. The simplest approach would seem something like:
Using C++11 lambdas with
function_property_map
Live On Coliru
Using C++03 with
transform_value_property_map
This is mainly much more verbose:
Live On Coliru
Output
Both samples output