Skip to content

Commit 324cafe

Browse files
committed
Dont count root->root rel
For mutate and write mode, we dont count this relationship
1 parent 53849b0 commit 324cafe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

algo/src/main/java/org/neo4j/gds/spanningtree/SpanningGraph.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public int degree(long nodeId) {
5858

5959
@Override
6060
public long relationshipCount() {
61-
// parent -> node for each node (root -> root included)
62-
return spanningTree.effectiveNodeCount();
61+
// not counting root -> root as a rel
62+
return spanningTree.effectiveNodeCount() - 1;
6363
}
6464

6565
@Override

0 commit comments

Comments
 (0)