Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit d847f82

Browse files
committed
remove prints
1 parent 7633780 commit d847f82

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

algo/src/main/java/org/neo4j/graphalgo/impl/pagerank/EigenvectorCentralityComputeStep.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,4 @@ void normalizeDeltas() {
9999
deltas[i] = deltas[i] / l2Norm;
100100
}
101101
}
102-
103-
@Override
104-
public String toString() {
105-
return "EigenvectorCentralityComputeStep{" +
106-
"partitionSize=" + partitionSize +
107-
", startNode=" + startNode +
108-
'}';
109-
}
110102
}

algo/src/main/java/org/neo4j/graphalgo/impl/pagerank/PageRank.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ CentralityResult getPageRank() {
352352
private void run(int iterations) {
353353
// initialize data structures
354354
ParallelUtil.runWithConcurrency(concurrency, steps, pool);
355-
for (int i = 0; i < iterations && running(); i++) {
355+
for (int iteration = 0; iteration < iterations && running(); iteration++) {
356356
// calculate scores
357357
ParallelUtil.runWithConcurrency(concurrency, steps, 3, 1, TimeUnit.SECONDS, pool);
358358

@@ -382,7 +382,8 @@ private double computeNorm() {
382382
}
383383

384384
l2Norm = Math.sqrt(l2Norm);
385-
l2Norm = l2Norm < 0 ? 1: l2Norm;
385+
386+
l2Norm = l2Norm <= 0 ? 1 : l2Norm;
386387
return l2Norm;
387388
}
388389

core/src/main/java/org/neo4j/graphalgo/core/utils/ParallelUtil.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ private static void runWithConcurrency(
671671
int maxWaitRetries,
672672
TerminationFlag terminationFlag,
673673
ExecutorService executor) {
674-
675674
if (!canRunInParallel(executor)
676675
|| tasks.size() == 1
677676
|| concurrency <= 1) {
@@ -705,9 +704,7 @@ private static void runWithConcurrency(
705704
while (ts.hasNext()) {
706705
if (completionService.hasTasks()) {
707706
try {
708-
System.out.println("[ParallelUtil#runWithConcurrency] waiting for task to finish... " + executor);
709707
completionService.awaitNext();
710-
System.out.println("[ParallelUtil#runWithConcurrency] task finished... " + executor);
711708
} catch (ExecutionException e) {
712709
error = Exceptions.chain(error, e.getCause());
713710
} catch (CancellationException ignore) {
@@ -884,7 +881,6 @@ protected void done() {
884881
if (executor instanceof ThreadPoolExecutor) {
885882
pool = (ThreadPoolExecutor) executor;
886883
availableConcurrency = pool.getCorePoolSize();
887-
// availableConcurrency = 2;
888884
int capacity = Math.max(targetConcurrency, availableConcurrency) + 1;
889885
completionQueue = new ArrayBlockingQueue<>(capacity);
890886
} else {

0 commit comments

Comments
 (0)