Skip to content

@graphty/algorithms / index / indexed / condensation

Function: condensation() ​

condensation(s, options?): CondensationResult

Defined in: indexed/scc.ts:132

The condensation of a directed graph: its strongly connected components, and the DAG with one node per component that contract() builds from their labels. The labels already run 0..k-1, so contract keeps them as block indices and the condensed node numbering is the component numbering.

Parameters ​

s ​

GraphSnapshot

A directed snapshot

options? ​

ArcOrderOption = {}

The neighbour order Tarjan tries arcs in, which fixes the component numbering

Returns ​

CondensationResult

The components and the condensed graph

Throws ​

Error when the snapshot is undirected