Liking cljdoc? Tell your friends :D

vaelii.impl.graph

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.
raw docstring

bfs-treeclj

(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}}`.
sourceraw docstring

reach-allclj

(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.
sourceraw docstring

sccclj

(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.
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