igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] betweenness centrality -- negative and floating values?


From: Gábor Csárdi
Subject: Re: [igraph] betweenness centrality -- negative and floating values?
Date: Thu, 28 May 2009 13:22:39 +0200

Yong, your code works fine for me (Linux 32 & 64 bit, igraph 0.5.2) on
a random graph. Could you share your graph, and provide some
information on the platform you are using?

Best,
Gabor

On Thu, May 28, 2009 at 12:54 PM, Yong Zou <address@hidden> wrote:
> Hi all,
>
> I'm using igraph to calculate the betweenness centrality (BC) for a
> big network, like 10000 nodes. However, I got some negative values
> which seem to be strange for me. Here is the way I'm doing.
>
> igraph_vector_init(&result, 0);
> igraph_betweenness(&graph, &result, igraph_vss_all(), IGRAPH_UNDIRECTED);
>
> nNode = (int)igraph_vector_size(&result);
> for(i = 0; i < nNode; i++)
>        {
>           fprintf(f1_p, "%lf\n", (double)igraph_vector_e(&result, i) );
>        }
>      fclose(f1_p);
>
> some example values for the betweenness centrality
> 58743768046350440071168.000000 or -466347974268824518656.000000
>
> Does anyone think these values are correct?
>
> Furthermore, I have got some floating numbers for the betweenness.
> This is also interesting for me because BC of a vertex "is the number
> of geodesics going through it". This means BC should be integer
> values, doesn't it?
>
> I've tested the example "Lesson 3 of the C library documentation",
> which also shows some floating values. How do they come from?
>
> Many thanks,
> Yong
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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