multilevel.community fails to report modularity if weights are real numbers

Bug #1149658 reported by chaosbringer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
igraph
Fix Committed
Undecided
Gábor Csárdi

Bug Description

The summary says it all. Graph-file attached.

library(igraph)
g<-read.graph("chl_1.graphml", format="graphml")
E(g)$weight<-E(g)$Weight
com<-multilevel.community(g)
modularity(com)
[1] -Inf
Warning message:
In max(x$modularity) : no non-missing arguments to max; returning -Inf

Revision history for this message
chaosbringer (chaosbringer) wrote :
description: updated
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

OK, this happens, because the each vertex ends up in its own community, and in this case the modularity vector returned by the C level is empty. So this is a bug in the C function.

Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Fixed in commit d86a01cf589287faffc6002609c95982a64938b8

Changed in igraph:
status: New → Fix Committed
assignee: nobody → Gábor Csárdi (gabor.csardi)
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/472

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.