anchor.diff:              one_level(NewGD, NewWeights, NewModularity)
       end.
   
  +% Remove 2*CommWeight when edge is copmletely in the community
  +% self edges are not doubled
   remove_node(NodeComm, NodeDegree, CommWeight, Weights = #louvain_weights{}) ->
       Weights#louvain_weights{weights = dict:update(
           NodeComm,
  
positive.code:             {AllDegree - NodeDegree, InDegree - CommWeight}
          end, {-NodeDegree, -CommWeight}, Weights#louvain_weights.weights)}.
  
  add_node(NodeComm, NodeDegree, CommWeight, Weights) ->
      Weights#louvain_weights{weights = dict:update(
          NodeComm,
  
negative.code:     dict:fold(
          fun(_, {AW, CW}, Modularity) ->
              Modularity + CW/M -
              % XXX make x * x
              math:pow(AW/(M * 2.0), 2)
          end, 0, WeightsD).
  
  