[Boost-users] Boost Graphs - Betweenness Centrality

306 views
Skip to first unread message

Rupert Ogilvie

unread,
Sep 27, 2010, 3:58:22 AM9/27/10
to boost...@lists.boost.org

Hi all,

I’m trying to implement the Betweenness Centrality Calculation in the Boost Graph Library. I’ve created a graph with the following attributes:

 

typedef adjacency_list <vecS, vecS, undirectedS> Graph;

Graph G1;

 

But I’m struggling to get the Done object created right to pass into the calculation. If anyone has some example code or suggestions I’d be really grateful.

Apologies if this is a really basic question but I’m very new to C++ and Boost!

Many thanks in advance,

Rupert

Jeremiah Willcock

unread,
Sep 27, 2010, 3:38:40 PM9/27/10
to boost...@lists.boost.org
On Mon, 27 Sep 2010, Rupert Ogilvie wrote:

>
> Hi all,
>
> I�m trying to implement the Betweenness Centrality Calculation in the
> Boost Graph Library. I�ve created a graph with the following attributes:
>
> �


>
> typedef adjacency_list <vecS, vecS, undirectedS> Graph;
>
> Graph G1;
>

> �
>
> But I�m struggling to get the Done object created right to pass into the
> calculation. If anyone has some example code or suggestions I�d be
> really grateful.
>
> Apologies if this is a really basic question but I�m 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

Rupert Ogilvie

unread,
Sep 28, 2010, 11:16:22 AM9/28/10
to boost...@lists.boost.org
Hi Jeremiah,
Many thanks for the pointer, those gave me exactly what I needed!
Cheers,
Rupert


-----Original Message-----
From: boost-use...@lists.boost.org
[mailto:boost-use...@lists.boost.org] On Behalf Of Jeremiah
Willcock
Sent: 27 September 2010 20:39
To: boost...@lists.boost.org
Subject: Re: [Boost-users] Boost Graphs - Betweenness Centrality

On Mon, 27 Sep 2010, Rupert Ogilvie wrote:

>
> Hi all,
>
> I’m trying to implement the Betweenness Centrality Calculation in the
> Boost Graph Library. I’ve created a graph with the following attributes:


>
>
>
> typedef adjacency_list <vecS, vecS, undirectedS> Graph;
>
> Graph G1;
>
>
>

> But I’m struggling to get the Done object created right to pass into
> the calculation. If anyone has some example code or suggestions I’d be
> really grateful.
>
> Apologies if this is a really basic question but I’m 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_centralit
y.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 mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply all
Reply to author
Forward
0 new messages