Hey, I was wondering why compressing graphs to their largest component is so slow in comparison to doing this in C++ directly. The graph-tool way of doing by invoking remove_vertex_if or PurgeVertices are both not very fast. In former times I used copy_graph from boost to copy from a filtered graph object to a new graph object. I cannot find the respective function in graph-tool - is there a reason for that function missing? Ok, this double in-memory requirements, but from my experience things are a lot faster then. So in short: Could a copy_graph function be included in graph-tool? Thanks, -- Sebastian Weber Group of Cell Communication and Control Freiburg Institute for Advanced Studies - FRIAS School of Life Sciences - LIFENET Albert-Ludwigs-Universität Freiburg Albertstr. 19 79104 Freiburg T.: +49-761-203-97237 Fax:+49-761-203-97334
Hi, On 04/14/2011 02:11 PM, Sebastian Weber wrote:
So in short: Could a copy_graph function be included in graph-tool?
There is of course: u = Graph(g) and u = g.copy() However, both don't do what you want, and return a complete copy of the graph, with filters and all. I have intended to implement "pruning" of filtered vertices / edges for some time, but somehow forgot about it... But I just went ahead now and committed the implementation to git. You can now do this: u = Graph(g, prune=True) Which will give an unfiltered graph "u". Cheers, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Great! Now compression of a graph to its largest component is much faster, i.e. some orders of magnitude! Am 14.04.2011 um 15:28 schrieb Tiago de Paula Peixoto:
Hi,
On 04/14/2011 02:11 PM, Sebastian Weber wrote:
So in short: Could a copy_graph function be included in graph-tool?
There is of course:
u = Graph(g)
and
u = g.copy()
However, both don't do what you want, and return a complete copy of the graph, with filters and all. I have intended to implement "pruning" of filtered vertices / edges for some time, but somehow forgot about it... But I just went ahead now and committed the implementation to git. You can now do this:
u = Graph(g, prune=True)
Which will give an unfiltered graph "u".
Cheers, Tiago
-- Tiago de Paula Peixoto <tiago@skewed.de>
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
-- Sebastian Weber Group of Cell Communication and Control Freiburg Institute for Advanced Studies - FRIAS School of Life Sciences - LIFENET Albert-Ludwigs-Universität Freiburg Albertstr. 19 79104 Freiburg T.: +49-761-203-97237 Fax:+49-761-203-97334
participants (2)
-
Sebastian Weber -
Tiago de Paula Peixoto