On 23.11.2015 20:35, m jadidi wrote:
Hi, I am trying to implement a function to remove some fraction of high degree nodes based on initial lcc (1% in every step) until the lcc will be destructed completely (size zero). to test my code I am using DBLP coauthor ship network which is already shown that the lcc of the this graph will be destructed after removing 1.5% of high degree nodes. However my code fail to that,. one thing that I am not sure is that when we mask some nodes and then use GraphView(G,vfilt=mask), it does not take of isolated vertices after masking. So I had to check for them manually. thanks for any hint!
I did not review your code in detail; you should try to provide a minimal example of the problem, together with the expected and obtained behaviors. But it seems to me that you are simply building the vertex mask incorrectly. Note that when you do mask.a, it returns an array pointing to all vertices, even those that are currently being masked. If you want to obtain an array only for the unmasked nodes, you should use mask.fa. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>