Commit b8e2564
committed
fix(leiden): handle directed graphs in CPM quality gain calculation
diffCPM was reading neighborEdgeWeightToCommunity which is only
populated in the undirected path of accumulateNeighborCommunityEdgeWeights.
For directed graphs, use outEdgeWeightToCommunity + inEdgeWeightFromCommunity
to correctly account for edge weights in both directions.
Impact: 1 functions changed, 4 affected1 parent e89371b commit b8e2564
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| |||
0 commit comments