Graph-generating functions
Graph-generating functions
(gen-rand g
num-nodes
num-edges
&
{:keys [min-weight max-weight loops seed]
:or {min-weight 1 max-weight 1 loops false seed (System/nanoTime)}})
Adds num-nodes nodes and approximately num-edges edges to graph g. Nodes used for each edge are chosen at random and may be chosen more than once.
Adds num-nodes nodes and approximately num-edges edges to graph g. Nodes used for each edge are chosen at random and may be chosen more than once.
(gen-rand-p g
num-nodes
p
&
{:keys [min-weight max-weight loops seed]
:or
{min-weight 1 max-weight 1 loops false seed (System/nanoTime)}})
Adds num-nodes nodes to graph g with the probably p of an edge between each node.
Adds num-nodes nodes to graph g with the probably p of an edge between each node.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close