0.5.17
Network Improvements
Adds a few new features to Networks to power network analysis. (Thanks, Complex Networks Winter Workshop!)
Network.clusteringCoefficient(agent)
: Calculates the clustering coefficient for an agent in the network. The clustering coefficient is a measure of how connected this agent's neighbors are (i.e. how much of a 'cluster' it is a part of). If all of the agent's neighbors are also connected to each other, this will be1
, and if none of them are connected to each other, it will be0
.Network.clusteringCoefficient()
: Calling this method with no parameters returns the global clustering coefficient, a value between0
and1
Network.averageClusteringCoefficient()
: The average clustering coefficient is another global measure, although it differs from the global clustering coefficient.
This also adds a new helper class Array2D
, which is a thin wrapper around NumArray
to handle 2-dimensional arrays. Under the hood, Networks
now include both adjacency list and adjacency matrix representations, the latter being an Array2D
of 0s and 1s.