-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularity with Edge Weight Causes Array Out-of-Bounds #577
Comments
Hi, To help me solve the issue, can you provide a (small) graph which exhibits this behavior ? Does it happen on every graph ? |
You can find the graph in question here: |
Happened to me today as well on a weighted graph. |
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. |
Any word on whether this will be fixed in trunk anytime soon? I get this error on every weighted modularity I run on different graphs (I guess I make problem weights) |
I tested and merged the fix. |
Modularity runs fine on the network I'm examining if "Use Weights" is unchecked. If it's checked, I get this:
java.lang.ArrayIndexOutOfBoundsException: -1
at org.gephi.statistics.plugin.Modularity$CommunityStructure.zoomOut(Modularity.java:338)
at org.gephi.statistics.plugin.Modularity$CommunityStructure.access$400(Modularity.java:122)
at org.gephi.statistics.plugin.Modularity.execute(Modularity.java:452)
at org.gephi.statistics.plugin.Modularity.execute(Modularity.java:396)
at org.gephi.statistics.StatisticsControllerImpl.execute(StatisticsControllerImpl.java:154)
at org.gephi.statistics.StatisticsControllerImpl$3.run(StatisticsControllerImpl.java:141)
[catch] at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
The text was updated successfully, but these errors were encountered: