igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Question about fastgreedy.community


From: Tamás Nepusz
Subject: Re: [igraph] Question about fastgreedy.community
Date: Fri, 4 May 2012 23:10:36 +0200

> I'm a starter in igraph and also in R. I met a problem when learn
> about fastgreedy.community

The problem lies not within fastgreedy.community but within the graph generated 
by degree.sequence.game. The default generation method ("simple") does not 
prevent degree.sequence.game from creating loop or multiple edges, and if it 
does, fastgreedy.community will fail. You have two options here:

1) call simplify() on the generated graph to get rid of multiple and loop 
edges. Of course this distorts the degree sequence a bit, i.e. you won't get 
exactly the same degree sequence as the one you have specified in "deg"

2) use method="vl" instead of method="simple" when calling 
degree.sequence.game. method="vl" uses the Viger-Latapy generation method, 
which is guaranteed to produce simple graphs that are then accepted by 
fastgreedy.community.

-- 
T.






reply via email to

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