David Menendez wrote:
From what I can tell, insEdge inserts an edge between two nodes which
are already in the graph. The code is calling insEdge on
arbitrarily-labeled nodes, which may not exist in the graph.
That's what I thought initially, but in fact what it is doing is exactly what you suggest:
Instead of picking arbitrary node labels, try selecting arbitrary
elements from the list of node labels.

That "nGen = elements ns" line assigns into nGen a random generator that will pick from ns, the list of nodes.

Thanks,

Neil.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to