# meanDegree¶

meanDegree()
Returns the mean degree of the network as a float.

## Notes¶

If is the number of nodes in the network and is its adjacency matrix (i.e. , if there is an edge connecting node to node , and otherwise), the mean degree is defined as:

## Example (python-conedy)¶

import conedy as co

N = co.network()

N.completeNetwork(10)  # creates a network of 10 nodes, where every pair is connected by an unweighted edge
print "Should be 9: " + str (N.meanDegree())

N.clear()
N.cycle(50, 3, co.node(), co.weightedEdge())
N.rewire(0.9)
print "Should be 6: " + str (N.meanDegree())


## Example (conedy)¶

network N;

setRandomSeed(0);

N.completeNetwork (10, node(), edge());
print "Should be 9: " + N.meanDegree() + newline;

N.clear();

N.cycle(50, 3, node(), weightedEdge());
N.rewire(0.9);
print "Should be 6: " + N.meanDegree() + newline;