Skip to content

Commit 40a5128

Browse files
Merge pull request #6695 from jjaderberg/steiner-tree-nits
[Steiner] Beta Tier + Progress Tracking + Nitpicks
2 parents 5679b0c + 626b2e1 commit 40a5128

26 files changed

+448
-310
lines changed

algo/src/main/java/org/neo4j/gds/steiner/LinkCutNode.java

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,14 @@ class LinkCutNode {
2323
private LinkCutNode up;
2424
private LinkCutNode left;
2525
private LinkCutNode right;
26-
private long source;//from;
27-
private long target;//to;
28-
26+
private final long source;//from;
2927
private boolean reverseBit;
3028

31-
LinkCutNode(long source, long target, LinkCutNode p) {
29+
LinkCutNode(long source, LinkCutNode p) {
3230
up = p;
3331
left = null;
3432
right = null;
3533
this.source = source;
36-
this.target = target;
3734
reverseBit = false;
3835
}
3936

@@ -49,16 +46,25 @@ void setChild(LinkCutNode node, Direction direction) {
4946
}
5047
}
5148

52-
boolean getReversedBit() {return reverseBit;}
53-
54-
long source() {return source;}
49+
boolean getReversedBit() {
50+
return reverseBit;
51+
}
5552

53+
long source() {
54+
return source;
55+
}
5656

57-
LinkCutNode parent() {return up;}
57+
LinkCutNode parent() {
58+
return up;
59+
}
5860

59-
LinkCutNode left() {return left;}
61+
LinkCutNode left() {
62+
return left;
63+
}
6064

61-
LinkCutNode right() {return right;}
65+
LinkCutNode right() {
66+
return right;
67+
}
6268

6369
LinkCutNode root() {
6470
LinkCutNode current = this;
@@ -85,7 +91,6 @@ boolean isChildOf(LinkCutNode node) {
8591
}
8692

8793
static LinkCutNode createSingle(long id) {
88-
return new LinkCutNode(id, id, null);
94+
return new LinkCutNode(id, null);
8995
}
90-
9196
}

0 commit comments

Comments
 (0)