Liking cljdoc? Tell your friends :D

hara.sort.topological


top-nodesclj

(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}
raw docstring

topological-sortclj

(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)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close