Back

gen-rand (clj)

(source)

function

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

Examples