On Thu, 5 Sep 2013, potato_research wrote:
I'd like to add, as a future reference, that this approach works well when the bundled property is a pointer. An example could be when you have many graphs with the same underlying vertex set and different edges, so you might want to use pointers to VertexProperty objects as bundled properties.
In particular, VertexProperty could contain a field to be used as the vertex index. See, for example http://pastebin.com/6zpwCb4X for such an object (in the example we don't use pointers, though). In this case we can still use algorithms such as r_c_shortest_paths that expect an index map by adding
value_type operator[](const Arg& arg) const { return f(arg); }
to function_property_map as posted by Jeremiah and edited by Maxime.
Is that something that should be changed in Boost itself? -- Jeremiah Willcock