Walktrap: graphs with isolated vertices are not accepted
Bug #1066081 reported by
Christopher Lu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Fix Released
|
Medium
|
Tamás Nepusz |
Bug Description
Walktrap does not operate on graphs with isolated vertices; why is this not allowed? It can handle graphs with multiple connected components, so it makes sense for isolated vertices to be handled the same way.
The algorithm itself appears to be able to handle this, but the conversion from an igraph graph will divide by zero when calculating the average edge weight for the loop edge. For isolated vertices, the weight of the loop edge doesn't matter.
A patch against top of trunk implementing the necessary change is attached.
Changed in igraph: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The original implementation of the walktrap method from Pascal Pons did not allow isolated vertices either and we just replaced the error message in his code with an appropriate igraph error code. I'll read the paper once again to see that it really doesn't matter and if so, I'll merge your patch. Thanks!