Skip to content

Commit 5686603

Browse files
committed
forever moar tidying up unused dependency
1 parent 8c06c3f commit 5686603

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

algo/src/main/java/org/neo4j/gds/kcore/KCoreDecomposition.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ public class KCoreDecomposition extends Algorithm<KCoreDecompositionResult> {
4848
//When only 2% nodes remain in the graph, we can create a smaller array to loop over these ones only
4949
static double REBUILD_CONSTANT = 0.02;
5050

51-
public KCoreDecomposition(Graph graph, Concurrency concurrency, ProgressTracker progressTracker, TerminationFlag terminationFlag) {
52-
this(graph, concurrency, progressTracker, CHUNK_SIZE, terminationFlag);
51+
public KCoreDecomposition(Graph graph, Concurrency concurrency, ProgressTracker progressTracker) {
52+
this(graph, concurrency, progressTracker, CHUNK_SIZE);
5353
}
5454

55-
KCoreDecomposition(Graph graph, Concurrency concurrency, ProgressTracker progressTracker, int chunkSize, TerminationFlag terminationFlag) {
55+
KCoreDecomposition(Graph graph, Concurrency concurrency, ProgressTracker progressTracker, int chunkSize) {
5656
super(progressTracker);
5757
this.graph = graph;
5858
this.concurrency = concurrency;
5959
this.chunkSize = chunkSize;
60-
this.terminationFlag = terminationFlag;
6160
}
6261

6362
@Override

algo/src/test/java/org/neo4j/gds/kcore/KCoreDecompositionTest.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.neo4j.gds.extension.IdFunction;
3636
import org.neo4j.gds.extension.Inject;
3737
import org.neo4j.gds.extension.TestGraph;
38-
import org.neo4j.gds.termination.TerminationFlag;
3938

4039
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
4140
import static org.neo4j.gds.assertj.Extractors.removingThreadId;
@@ -77,7 +76,7 @@ class BlossomGraph {
7776
@ValueSource(ints = {1, 4})
7877
void shouldComputeCoreDecomposition(int concurrency) {
7978

80-
var kcore = new KCoreDecomposition(graph, new Concurrency(concurrency), ProgressTracker.NULL_TRACKER, 1, TerminationFlag.RUNNING_TRUE).compute();
79+
var kcore = new KCoreDecomposition(graph, new Concurrency(concurrency), ProgressTracker.NULL_TRACKER, 1).compute();
8180
assertThat(kcore.degeneracy()).isEqualTo(2);
8281
var coreValues = kcore.coreValues();
8382

@@ -146,7 +145,7 @@ class ThreeCoreGraph {
146145
void shouldComputeCoreDecomposition(int concurrency) {
147146
IdFunction idFunction = graph::toMappedNodeId;
148147

149-
var kcore = new KCoreDecomposition(graph, new Concurrency(concurrency), ProgressTracker.NULL_TRACKER, 1, TerminationFlag.RUNNING_TRUE).compute();
148+
var kcore = new KCoreDecomposition(graph, new Concurrency(concurrency), ProgressTracker.NULL_TRACKER, 1).compute();
150149
assertThat(kcore.degeneracy()).isEqualTo(3);
151150
var coreValues = kcore.coreValues();
152151

@@ -181,7 +180,7 @@ class EmptyGraph {
181180
@Test
182181
void shouldComputeCoreDecomposition() {
183182

184-
var kcore = new KCoreDecomposition(graph, new Concurrency(1), ProgressTracker.NULL_TRACKER, 1, TerminationFlag.RUNNING_TRUE).compute();
183+
var kcore = new KCoreDecomposition(graph, new Concurrency(1), ProgressTracker.NULL_TRACKER, 1).compute();
185184
assertThat(kcore.degeneracy()).isEqualTo(0);
186185
var coreValues = kcore.coreValues();
187186

@@ -216,7 +215,7 @@ class K4Graph {
216215

217216
@Test
218217
void shouldAdvanceScanningDegreeCorrectly() {
219-
var kcore = new KCoreDecomposition(graph, new Concurrency(1), ProgressTracker.NULL_TRACKER, 1, TerminationFlag.RUNNING_TRUE).compute();
218+
var kcore = new KCoreDecomposition(graph, new Concurrency(1), ProgressTracker.NULL_TRACKER, 1).compute();
220219
assertThat(kcore.degeneracy()).isEqualTo(3);
221220
var coreValues = kcore.coreValues();
222221

@@ -267,8 +266,7 @@ void shouldLogProgress() {
267266
var kCore = new KCoreDecomposition(
268267
graph,
269268
concurrency,
270-
progressTrackerWithLog.progressTracker(),
271-
TerminationFlag.RUNNING_TRUE
269+
progressTrackerWithLog.progressTracker()
272270
);
273271
kCore.compute();
274272

applications/algorithms/community/src/main/java/org/neo4j/gds/applications/algorithms/community/CommunityAlgorithms.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ KCoreDecompositionResult kCore(
152152
return new KCoreDecomposition(
153153
graph,
154154
parameters.concurrency(),
155-
progressTracker,
156-
terminationFlag
155+
progressTracker
157156
).compute();
158157
}
159158

0 commit comments

Comments
 (0)