Skip to main content

Module toposort

Module toposort 

Source
Expand description

Port of internal/toposort: orders the nodes of a directed acyclic graph so that every node follows the nodes it depends on, using Kahn’s algorithm.

Enums§

ToposortError

Functions§

sort
Orders nodes so that each follows the nodes deps says it depends on. The order among nodes the dependencies leave free is unspecified. A dependency outside the node set is ignored; a node depending on itself is a cycle.