Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Having a cost function as weight map
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2013-09-05 16:30:38

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 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

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at