[Top][All Lists]

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

[igraph] igraph.community_fastgreedy method and isolated vertices

From: venura.2.mendis
Subject: [igraph] igraph.community_fastgreedy method and isolated vertices
Date: Thu, 7 Aug 2008 14:41:31 +0100


I believe I have constructed a graph correctly as I can plot it and view
a summary of it. However the programme terminates when I attempt to run
community_fastgreedy method. It doesn't throw any exceptions and doesn't
make it past the call to the function, it just exists so am not sure why
its falling over. I suspect its because of isolated vertices (not
connected to any other nodes) in my graph. I tried to remove them using
the following code, however looking at the plot of the final results it
doesn't appear to remove all the isolated vertices

        degrees =  self.g.degree(self.g.vs)
        for degree in degrees:
            if degree==0:

I presume this bit of code isn't working properly because
g.delete_vertices(vCount) changes the degrees object and the wrong
vertices get removed. So my questions are 
1) Is the community_fastgreedy method falling over because of the
isolated vertices?
2) How do I remove the isolated vertices correctly?

Thanks for you help,

reply via email to

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