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, 24 Sep 2009 17:14:53 +0100

However, my old program doesn't work for this new version igraph. More
specifically:
igraph_betweenness(&graph, &result, igraph_vss_all(),
IGRAPH_UNDIRECTED); --> This worked on my computer before if 0.5.2 is
used.

Now, too few arguments to function ‘igraph_betweenness’

Can you please help me about the new syntax?
Check out igraph/igraph_centrality.h:

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);

Basically, betweenness got two extra arguments: a weight vector and a boolean which should be false (zero) if you want to use big integers and true (1) if you want to use the original implementation (which is faster). So you have to add two extra arguments to the above call:

igraph_betweenness(&graph, &result, igraph_vss_all(), IGRAPH_UNDIRECTED, 0, 0);

This should work.

Best,
--
Tamas





reply via email to

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