[graph-tool] Bug in Graph pruning?
Tiago de Paula Peixoto
tiago at skewed.de
Tue May 31 00:38:35 CEST 2011
On 05/30/2011 04:18 PM, Sebastian Weber wrote:
> I just discovered a quite strange behavior of graph-tool. I want to
> keep only the largest component of my network and the following code
> comp = label_largest_component(G)
> lc = comp.a == 1
> Gv = Graph(GraphView(G, vfilt=lc), prune=True)
> simply gives wrong results. It deletes vertices which are in the LC
> and have comp[v]==1 !!!
I cannot reproduce this problem. Do you have a concrete (and simple)
example of where this happens?
With "prune=True", the filtered vertices are not deleted, but rather
only the non-filtered vertices are copied. So in order for this to
somehow fail, there must be something wrong with the filtered graph you
are trying to copy.
BTW, why do you use 'lc' as the vfilt parameter of GraphView, instead of
Tiago de Paula Peixoto <tiago at skewed.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 554 bytes
Desc: OpenPGP digital signature
More information about the graph-tool