Skip to content

@graphty/algorithms / index / transitiveClosure

Function: transitiveClosure() ​

transitiveClosure(graph): Map<NodeId, Set<NodeId>>

Defined in: algorithms/shortest-path/floyd-warshall.ts:172

Computes the transitive closure of a graph using Floyd-Warshall

Parameters ​

graph ​

Graph

The graph to compute transitive closure for

Returns ​

Map<NodeId, Set<NodeId>>

A map of each node to the set of nodes reachable from it