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?
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: