Liking cljdoc? Tell your friends :D
All platforms.

commando.impl.graph


topological-sortclj/s

(topological-sort g)

Efficiently sorts a directed acyclic graph using Kahn's algorithm with in-degree counting. 'g' is a map of nodes to sequences of their dependencies. Returns a map with :sorted containing the topologically sorted list of nodes, and :cyclic containing the remaining nodes if a cycle is detected.

Efficiently sorts a directed acyclic graph using Kahn's algorithm with in-degree counting.
'g' is a map of nodes to sequences of their dependencies.
Returns a map with :sorted containing the topologically sorted list of nodes,
and :cyclic containing the remaining nodes if a cycle is detected.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close