[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Re: New syntax for betweenness?
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] Re: New syntax for betweenness? |
Date: |
Thu, 26 Nov 2009 14:17:23 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
> Interesting. It's working with my C program.
>
> But not working in Python.
Are you sure you are using 0.6 in the Python interface? Try the
following:
>>> import igraph
>>> print igraph.__version__
It should be 0.6, and the betweenness function definitely works for me
in 0.6, with or without the nobigint=... keyword argument.
--
Tamas
>
> 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