Condensation Graph - KeRNeLith/QuikGraph GitHub Wiki

Condensation Graph

This algorithm condensates any graph by merging a set of edges in a condensed edge. The user can provide a predicate of edges to specify which edge to condensate or condense by components as well.

The AlgorithmExtensions class provide various helpers to condensate graphs:

IVertexAndEdgeListGraph<TVertex, TEdge> graph = ...; // Input graph

// Condensations
var weaklyCondensed = graph.CondensateWeaklyConnected();
var stronglyCondensed = graph.CondensateStronglyConnected();