Generates a random scale-free network with Nodes nodes using the Copying Model. The generating process operates as follows: Node u is added to a graph, it selects a random node v, and with probability Beta it links to v, with 1 - Beta links u links to neighbor of v.
Parameters:
Number of nodes in the generated graph.
Probability used in the generating process.
Random number generator.
Return value:
A Snap.py directed graph generated using the Copying Model.
The following example shows how to generate a TNGraph using GenCopyModel():
import snap
Graph = snap.GenCopyModel(20, 0.4, snap.TRnd())
print "Resulting Graph: Nodes %d, Edges %d" % (Graph.GetNodes(), Graph.GetEdges())