Contract graph based on groups
Hi,
GraphTool seems really useful and fast but there is a feature I need that would be useful.
There is a method in IGraph that can get a VertexClustering (basically a mapping between vertices in the graph and new verticies) and apply it to the current graph to get a new graph where nodes are grouped based on the defined mapping and edges are redrawn, ideally this could be done in O(E) complexity by iterating over all the edges and recreating in the new graph using the mapping to convert the verticies.
The implementation in IGraph is here: https://github.com/igraph/igraph/blob/9486922ac23905270735efe841325a6ea0197591/src/structural_properties.c#L6347