Boost logo

Boost Users :

Subject: Re: [Boost-users] How to make custom property map compatible with bgl_named_params?
From: Tim Keitt (tkeitt_at_[hidden])
Date: 2008-11-26 13:41:37


On Sun, Nov 23, 2008 at 4:40 PM, Tim Keitt <tkeitt_at_[hidden]> wrote:
> I have a custom (internal) property map defined as:
.......
>
> boost::brandes_betweenness_centrality(g, centrality,
> boost::weight_map(get(boost::edge_weight, g)));
>

Oh bother. This was very simple. Unlike nearly every other algorithm
in the Graph library, this one is called with all or none named
parameters (except for the graph itself):

boost::brandes_betweenness_centrality(g,
boost::centrality_map(centrality).weight_map(get(boost::edge_weight,
g)));

works fine. Sigh.

THK

-- 
Timothy H. Keitt
http://www.keittlab.org/

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