Returns the mean weight of the network, taking only existing edges into account.


If n is the number of nodes and m is the number of edges in the network and W_{ij} is the weight of the edge connecting i and j (and 0, if this edge does not exist), the mean weight of the network is defined as:

\frac{1}{m} \sum_{i=1}^n \sum_{j=1}^n W_{ij}

Example (python-conedy)

import conedy as co

N =

N.randomNetwork(100, 0.2, co.node(), co.weightedEdge())

N.randomizeWeights(co.uniform (0.0, 1.5))

print "Should be close to 0.75:" + str(N.meanWeight())

Example (conedy)

network N;

N.randomNetwork(100, 0.2, kuramoto(), weightedEdge());

N.randomizeWeights( uniform (0.0,1.5) );

print "Should be close to 0.75:" + N.meanWeight() + newline ;

Table Of Contents

Previous topic


Next topic