Condensation Graph - YaccConstructor/QuickGraph GitHub Wiki

Condensation Graph

This algorithm condensate any graph by merge 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, Condensate..., to condense graphs:

IVertexAndEdgeListGraph<TVertex, TEdge> g = ...; // input graph
var condensed = g.CondenstateWeaklyConnected();