igraph-help
[Top][All Lists]
Advanced

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

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


From: Yong Zou
Subject: [igraph] betweenness centrality -- negative and floating values?
Date: Thu, 28 May 2009 12:54:46 +0200

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




reply via email to

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