Closed SimonNick closed 6 years ago
Also the sum is overwritten not added in line 233 and 234, which might also be a bug
@verginer Good point, but I think in this case it is correct since in an undirected network there is no difference between in- and out-edges and therefore also no difference between in-weight and out-weight.
Yes you are complete right, I have added some tests 19a2eb5f04254238e937fc894646f67ee6d2cfcc and your changes all work perfectly
Thanks!
The assignment in line 233 and 234 should be fine. The idea is to recalculate the weighted degree from the edge weights of incoming and outgoing edges whenever the network is changed. This simplifies the logic to keep weighted degrees consistent.
Note: to change 'successors' to 'predecessors' in line 231 is not required since those are the same for undirected networks, but it makes more sense logically.