Liking cljdoc? Tell your friends :D
All platforms.

commando.impl.graph


topological-sortclj/s

(topological-sort g)
(topological-sort g l s)

Sort for acyclic directed graph g (using khan algo). Where g is a map of nodes to sets of nodes. If g contains cycles, it orders the acyclic parts and leaves cyclic parts as is. Returns a map with :sorted containing result and :cyclic containing cycles if exists

Sort for acyclic directed graph g (using khan algo).
Where g is a map of nodes to sets of nodes.
If g contains cycles, it orders the acyclic parts and leaves cyclic parts as is.
Returns a map with :sorted containing result and :cyclic containing cycles if exists
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