(top-nodes g)
nodes that have no other nodes that are dependent on them (top-nodes {:a #{} :b #{:a}}) => #{:b}
nodes that have no other nodes that are dependent on them (top-nodes {:a #{} :b #{:a}}) => #{:b}
(topological-sort g)
(topological-sort g l s)
sorts a directed graph into its dependency order
(topological-sort {:a #{:b :c}, :b #{:d :e}, :c #{:e :f}, :d #{}, :e #{:f}, :f nil}) => [:f :d :e :b :c :a]
(topological-sort {:a #{:b}, :b #{:a}}) => (throws Exception)
sorts a directed graph into its dependency order (topological-sort {:a #{:b :c}, :b #{:d :e}, :c #{:e :f}, :d #{}, :e #{:f}, :f nil}) => [:f :d :e :b :c :a] (topological-sort {:a #{:b}, :b #{:a}}) => (throws Exception)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close