Liking cljdoc? Tell your friends :D
Clojure only.

loom.gen

Graph-generating functions

Graph-generating functions
raw docstring

gen-randclj

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

gen-rand-pclj

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

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close