addRandomEdgesDegreeDistribution

directedNetwork.addRandomEdgesDegreeDistribution (random, edgeTemplate=weightedEdge) undirectedNetwork.addRandomEdgesDegreeDistribution (random, edgeTemplate=weightedEdge)

Add edges of type edgeTemplate with randomly chosen source and target nodes such that each node gets a number of new connections which is drawn from the distribution random. Self connections and parallel (duplicate) edges are avoided.

Parameters

random: float
Nodes are added until the mean degree of the network reaches m.
edge: edge template
Every added edge is a copy of this template.

Example (python-conedy)

import conedy as co

N = co.network()


for i in range (0,10000):
      N.addNode (co.node ())

N.addRandomEdgesDegreeDistribution(co.uniform (0.0,100.0), co.edge()  )

N.inDegreeDistribution("output/addRandomEdgesDegreeDistribution.py.degDist")
print N.meanDegree()

Example (conedy)

directedNetwork N;

loop (10000)
      N.addNode (node ());

N.addRandomEdgesDegreeDistribution(uniform (0.0,100.0), edge  );


N.inDegreeDistribution("output/addRandomEdgesDegreeDistribution.degDist");
print N.meanDegree();

Table Of Contents

Previous topic

addRandomEdges

Next topic

addWeightedEdge