Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Modularity with Edge Weight Causes Array Out-of-Bounds #577
Modularity runs fine on the network I'm examining if "Use Weights" is unchecked. If it's checked, I get this:
The issue seems to be caused by some floating point arithmetic. When you remove a node from a community (it happens during the execution), the connections between this node community and the neighbors one are updated and removed if weights is 0. With small weights, is is sometimes very close to zero but not strictly zero.
I have written a small workaround on my personnal fork, but I need more investigation and test to see if it is the right fix.