|
Boost Users : |
Subject: Re: [Boost-users] Boost Graphs - Betweenness Centrality
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-09-27 15:38:40
On Mon, 27 Sep 2010, Rupert Ogilvie wrote:
>
> Hi all,
>
> Im trying to implement the Betweenness Centrality Calculation in the
> Boost Graph Library. Ive created a graph with the following attributes:
>
>
>
> typedef adjacency_list <vecS, vecS, undirectedS> Graph;
>
> Graph G1;
>
>
>
> But Im struggling to get the Done object created right to pass into the
> calculation. If anyone has some example code or suggestions Id be
> really grateful.
>
> Apologies if this is a really basic question but Im very new to C++ and
> Boost!
Which betweenness centrality algorithm are you using? Brandes' algorithm
(http://www.boost.org/doc/libs/1_44_0/libs/graph/doc/betweenness_centrality.html)
does not seem to require a Done object. There is an example program for
that algorithm in libs/graph/test/betweenness_centrality_test.cpp in the
Boost source tree. Or do you mean betweenness_centrality_clustering? An
example for it (including a correct Done object) is in
libs/graph/example/actor_clustering.cpp in the Boost source tree.
-- Jeremiah Willcock
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