igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Re: New syntax for betweenness?


From: Gábor Csárdi
Subject: Re: [igraph] Re: New syntax for betweenness?
Date: Thu, 26 Nov 2009 15:20:09 +0100

Your igraph-python version does not match the igraph C library version. I guess.

Gabor

On Thu, Nov 26, 2009 at 2:32 PM, Yong Zou <address@hidden> wrote:
> Sorry Tamas,
>
> Interesting. It's working with my C program.
>
> But not working in Python.
>
> Do you have any idea?
>
> Yong
>
> On Thu, Nov 26, 2009 at 2:24 PM, Yong Zou <address@hidden> wrote:
>> 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
>>>
>>
>
>
> _______________________________________________
> 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]