(connectivity g)
Measures vertex-connectivity.
Measures vertex-connectivity.
(degrees g)
Given a graph, returns a map from vertex numbers to their degree.
Given a graph, returns a map from vertex numbers to their degree.
(distance g v1 v2)
Returns an integer distance, or nil if the vertices are not in the same connected component
Returns an integer distance, or nil if the vertices are not in the same connected component
(distances-per-node g)
Returns a map from each node to the sum of its distances to all other nodes.
Returns a map from each node to the sum of its distances to all other nodes.
(induced-subgraph g coll)
g is a graph, coll is a collection of vertices. Returns the induced subgraph with vertices labeled 0 to n-1 (as normal) corresponding to the supplied vertices in sorted order.
g is a graph, coll is a collection of vertices. Returns the induced subgraph with vertices labeled 0 to n-1 (as normal) corresponding to the supplied vertices in sorted order.
(isomorphisms g1 g2)
(isomorphisms g1-edges g2-edges mapping tos-left)
Returns a lazy seq of all permutations that transform g1 into g2.
Returns a lazy seq of all permutations that transform g1 into g2.
(permute g p)
Given a graph and a permutation (which is some sort of (vec (shuffle (range order)))), returns a new graph with the vertices permuted according to the permutation.
Given a graph and a permutation (which is some sort of (vec (shuffle (range order)))), returns a new graph with the vertices permuted according to the permutation.
(shortest-path g start end)
Returns a sequence of vertices starting with start
and ending
with end
, or nil if the two vertices are not connected.
Returns a sequence of vertices starting with `start` and ending with `end`, or nil if the two vertices are not connected.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close