
25 Nov
2009
25 Nov
'09
11:02 a.m.
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.