igraph-help
[Top][All Lists]
Advanced

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

[igraph] Re: New syntax for betweenness?


From: Tamas Nepusz
Subject: [igraph] Re: New syntax for betweenness?
Date: Thu, 26 Nov 2009 13:10:28 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Yong,

You can usually figure out the new syntax by looking at either the
source code of the corresponding routine or the corresponding header
file. E.g., to find which header file contains the definition for
igraph_betweenness, you can do the following in Linux:


$ find /usr/local/include/igraph | xargs grep -H igraph_betweenness

This gives you all the occurrences of igraph_betweenness in header
files. Then you can open the appropriate header file (which is
igraph_centrality.h in our case) and check the syntax:

int igraph_betweenness(const igraph_t *graph, igraph_vector_t *res,
                       const igraph_vs_t vids, igraph_bool_t directed,
                                           const igraph_vector_t *weights, 
igraph_bool_t
                                           nobigint);

You can see that there is one extra parameter: igraph_bool_t nobigint.
If this is true, igraph will use the "old" betweenness calculation
routine that may overflow in large pathologic graphs (e.g., regular
grids). If this is false, igraph will use arbitrary precision integers
to count the shortest paths, so there will be no overflow, but the
calculation takes longer.

-- 
Tamas




reply via email to

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