igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Help with using igraph_centralization_betweenness


From: Tamás Nepusz
Subject: Re: [igraph] Help with using igraph_centralization_betweenness
Date: Tue, 17 Jul 2012 12:08:29 +0200

Hi,  

Thank you, I have managed to reproduce your issue and this is indeed a bug: one 
of the variables overflow when igraph calculates the theoretical maximum of the 
betweenness centrality in igraph_centralization_betweenness_tmax. The 
workaround for the time being is as follows:

1. Call igraph_centralization_betweenness without normalization, keep the 
centralization score but ignore the theoretical maximum.
2. Calculate the theoretical maximum as follows:

igraph_real_t vcount = igraph_vcount(graph);
igraph_real_t tmax =  (vcount-1) * (vcount-1) * (vcount-2);

If (igraph_is_directed(graph))
  tmax /= 2;

tmax then contains the theoretical maximum of the betweenness score.

3. Divide the centralization score with the theoretical maximum to get the 
centralization score.

This will be fixed in the next minor release of igraph.

Best,--  
T.


On Tuesday, 17 July 2012 at 11:13, Giuseppe G. wrote:

> Hi,
>  
> my graph has 3695 nodes and 9814 edges.
>  
> On 13/07/12 11:37, Tamás Nepusz wrote:
> > Hi,
> >  
> > > Centralization - betweenness 4555078144.000000, max -980219904.000000
> > >  
> > > Any other suggestions on what I might be doing wrong? I played with the
> > > other boolean parameters with no success unfortunately.
> >  
> >  
> >  
> > How large your graph is? Centralization works fine for me the way you did 
> > it on a small random graph -- see the attached C source.
> >  
> > Best,
> > T.
>  
>  
>  
>  
>  
> --  
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>  
>  
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help






reply via email to

[Prev in Thread] Current Thread [Next in Thread]