Simplifying expression for delta modularity (Louvain algorithm, v2).
For details, see here: https://www.youtube.com/watch?v=0zuiLBOIcsw
The Louvain method for community detection is a method to extract communities from large networks created by Blondel et al.[1] from the University of Louvain (the source of this method's name). The method is a greedy optimization method that appears to run in time O(n.log n) if n is the number of nodes in the network.[2]