Graph walks over a caller-supplied neighbour fn: reachable set and strongly connected components.
A walk visits neighbours in the order step yields them and never sorts. See docs/namespaces.md.
Graph walks over a caller-supplied neighbour fn: reachable set and strongly connected components. A walk visits neighbours in the order `step` yields them and never sorts. See docs/namespaces.md.
(bfs-tree seeds step stop?)Breadth-first walk that records how each node was first reached. seeds is a seq of
[node entry] pairs; (step node tree) yields [child entry] pairs in the caller's
order, and tree (node -> entry) lets it skip the children already reached. A child
already in the tree keeps its first entry. Stops at the first dequeued node satisfying
stop?. Returns {:found node-or-nil :tree {node entry}}.
Breadth-first walk that records how each node was first reached. `seeds` is a seq of
`[node entry]` pairs; `(step node tree)` yields `[child entry]` pairs in the caller's
order, and `tree` (node -> entry) lets it skip the children already reached. A child
already in the tree keeps its first entry. Stops at the first dequeued node satisfying
`stop?`. Returns `{:found node-or-nil :tree {node entry}}`.(reach-all starts adj)Reflexive-transitive reachable set from every node of starts over adj (node ->
neighbours). Each node is expanded once, so a cyclic adj terminates.
Reflexive-transitive reachable set from every node of `starts` over `adj` (node -> neighbours). Each node is expanded once, so a cyclic `adj` terminates.
(scc roots step on-component)Tarjan's strongly connected components over the nodes reachable from roots under
step (node -> seq of neighbours), on an explicit stack. step is called once per
node, at its discovery. Calls (on-component members) once per component, members
a vector with the component's root last, in completion order. Returns nil.
Tarjan's strongly connected components over the nodes reachable from `roots` under `step` (node -> seq of neighbours), on an explicit stack. `step` is called once per node, at its discovery. Calls `(on-component members)` once per component, `members` a vector with the component's root last, in completion order. Returns nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |