igraph-help
[Top][All Lists]
Advanced

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

[igraph] Question about fastgreedy.community


From: hz hanks
Subject: [igraph] Question about fastgreedy.community
Date: Thu, 3 May 2012 20:57:29 -0700

Hi, All

I'm a starter in igraph and also in R. I met a problem when learn
about fastgreedy.community
Here's my simple code.

require(igraph)
N <- 1000
K <- (N-1)
p.k = (1:K)^(-3)
deg <- sample(1:K, N, replace=TRUE, prob=p.k)
if((sum(deg) %% 2) == 1)
{
        deg[1] = deg[1] + 1
}
g =degree.sequence.game(deg,method="simple")
community = fastgreedy.community(g)

And I found that, in most time, it'll have an error of " At
fast_community.c:539 : fast-greedy community finding works only on
simple graphs, Invalid value", though it did work successfully once.
And if I change the value of N to a small number, such as 10, it'll
always work successfully.

I've search in google, but I even didn't find matched results. Any one
can help me? Very appreciated.

Best,
Hanks



reply via email to

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