(add-edges g edges)
Add a list or vector of directed edges to a graph, where each node has the form [src dest attr-map].
Add a list or vector of directed edges to a graph, where each node has the form [src dest attr-map].
(add-nodes g nodes)
Add a list or vector of nodes to a graph, where each node has the form [node attr-map].
Add a list or vector of nodes to a graph, where each node has the form [node attr-map].
(attr g node-or-edge attr)
Return the attribute of a particular node or edge in a graph.
Return the attribute of a particular node or edge in a graph.
(collect-edges attr-edges)
Flatten a collection of edges (ie. vectors of form [src dest attrs] such that it is a 1D vector of vectors.
Flatten a collection of edges (ie. vectors of form [src dest attrs] such that it is a 1D vector of vectors.
(create-graph node-objs edge-objs)
Create a graph with node-objs
and edge-objs
, which should be
coerceable by node-with-attrs
and edges-with-attrs
,
respectively.
Create a graph with `node-objs` and `edge-objs`, which should be coerceable by `node-with-attrs` and `edges-with-attrs`, respectively.
(create-graph* nodes edges)
Create a graph with nodes
and edges
.
Create a graph with `nodes` and `edges`.
(dest edge)
Return the destination node of a directed edge.
Return the destination node of a directed edge.
(edges g)
Given a graph, return its edges.
Given a graph, return its edges.
(in-degree g node)
Return the in-degree of a node in a digraph.
Return the in-degree of a node in a digraph.
(new-digraph)
Init a new directed graph.
Init a new directed graph.
(nodes g)
Given a graph, return its nodes.
Given a graph, return its nodes.
(out-degree g node)
Return the out-degree of a node in a digraph.
Return the out-degree of a node in a digraph.
(scc g)
Return the strongly-connected components of a digraph as a vector of vectors. Uses Kosaraju's algorithm.
Return the strongly-connected components of a digraph as a vector of vectors. Uses Kosaraju's algorithm.
(src edge)
Return the source node of a directed edge.
Return the source node of a directed edge.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close