(add-edges graph edges)
Add a list or vector of directed edges to graph
, where each node has the
form [src dest attr-map].
Add a list or vector of directed edges to `graph`, where each node has the form [src dest attr-map].
(add-nodes graph nodes)
Add a list or vector of nodes to graph
, where each node has the form
[node attr-map].
Add a list or vector of nodes to `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 graph
.
Return the attribute of a particular node or edge in `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 graph)
Given graph
, return a lazy seq of its edges.
Given `graph`, return a lazy seq of its edges.
(in-degree g node)
Return the in-degree of node
in graph
.
Return the in-degree of `node` in `graph`.
(new-digraph)
Init a new, empty directed graph.
Init a new, empty directed graph.
(nodes graph)
Given graph
, return a set of its nodes.
Given `graph`, return a set of its nodes.
(out-degree g node)
Return the out-degree of node
in graph
.
Return the out-degree of `node` in `graph`.
(scc graph)
Return the strongly connected components of graph
as a vector of
vectors. Uses Kosaraju's algorithm.
Return the strongly connected components of `graph` 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