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: Yong Zou
Subject: [igraph] Re: New syntax for betweenness?
Date: Thu, 26 Nov 2009 14:24:32 +0100

Hi Tamas,

Thanks. But it seems not working.

bc = graph.betweenness(nobigint=False)
igraph_betweenness(&graph, &result, igraph_vss_all(), IGRAPH_UNDIRECTED, 0, 0);

Neither one (python, C) is working.
TypeError: 'nobigint' is an invalid keyword argument for this function
In C,
I haven't got any error message.

Yong



On Thu, Nov 26, 2009 at 2:10 PM, Tamas Nepusz <address@hidden> wrote:
> 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]