Skip to content

Commit 7dac4a0

Browse files
Fixes
Co-authored-by: Ioannis Panagiotas <ioannis.panagiotas@neo4j.com>
1 parent 83b211e commit 7dac4a0

File tree

7 files changed

+6
-15
lines changed

7 files changed

+6
-15
lines changed

algo/src/main/java/org/neo4j/gds/maxflow/DischargeTask.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ public class DischargeTask implements Runnable {
4949
private PHASE phase;
5050
private long localWork;
5151

52-
53-
5452
public DischargeTask(
5553
FlowGraph flowGraph,
5654
HugeDoubleArray excess,

algo/src/main/java/org/neo4j/gds/maxflow/Discharging.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ static Discharging createDischarging(
5252
)
5353
{
5454

55-
var tempLabel = HugeLongArray.newArray(flowGraph.originalNodeCount());
56-
var isDiscovered = HugeAtomicBitSet.create(flowGraph.originalNodeCount());
55+
var tempLabel = HugeLongArray.newArray(flowGraph.nodeCount());
56+
var isDiscovered = HugeAtomicBitSet.create(flowGraph.nodeCount());
5757

5858
List<Runnable> dischargeTasks = new ArrayList<>();
5959
for (int i = 0; i < concurrency.value(); i++) {

algo/src/main/java/org/neo4j/gds/maxflow/FlowGraph.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public FlowGraph concurrentCopy() {
159159
}
160160

161161
private void forEachOriginalRelationship(long nodeId, ResidualEdgeConsumer consumer) {
162-
//todo: Rename original, since it also includes 'non-reverse' edges from superNodes
163162
var relIdx = new MutableLong(indPtr.get(nodeId));
164163
RelationshipWithPropertyConsumer originalConsumer = (s, t, capacity) -> {
165164
var residualCapacity = capacity - flow.get(relIdx.longValue());

algo/src/main/java/org/neo4j/gds/maxflow/GlobalRelabeling.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import java.util.Collection;
3030
import java.util.List;
3131

32-
33-
3432
public final class GlobalRelabeling {
3533
private final long nodeCount;
3634
private final HugeLongArray label;
@@ -88,4 +86,3 @@ public void globalRelabeling() {
8886

8987
}
9088
}
91-

algo/src/main/java/org/neo4j/gds/maxflow/MaxFlow.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.neo4j.gds.collections.ha.HugeDoubleArray;
2525
import org.neo4j.gds.collections.ha.HugeLongArray;
2626
import org.neo4j.gds.collections.haa.HugeAtomicDoubleArray;
27-
import org.neo4j.gds.core.utils.paged.HugeAtomicBitSet;
2827
import org.neo4j.gds.core.utils.paged.HugeLongArrayQueue;
2928
import org.neo4j.gds.core.utils.paged.ParallelDoublePageCreator;
3029
import org.neo4j.gds.core.utils.progress.tasks.ProgressTracker;
@@ -87,9 +86,7 @@ private void maximizeFlow(Preflow preflow, long sourceNode, long targetNode) { /
8786
var addedExcess = HugeAtomicDoubleArray.of(
8887
nodeCount,
8988
ParallelDoublePageCreator.passThrough(parameters.concurrency())
90-
); //fixme
91-
var tempLabel = HugeLongArray.newArray(nodeCount);
92-
var isDiscovered = HugeAtomicBitSet.create(nodeCount);
89+
);
9390
var workingSet = new AtomicWorkingSet(nodeCount);
9491
for (var nodeId = 0; nodeId < nodeCount; nodeId++) {
9592
if (excess.get(nodeId) > 0.0) {

algo/src/main/java/org/neo4j/gds/maxflow/SupplyAndDemandFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static NodeWithValue[] createSupply(InputNodes sourceNodes, Graph graph)
5555
graph.toMappedNodeId(entry.getKey()),
5656
entry.getValue()
5757
)).toArray(NodeWithValue[]::new);
58-
default -> throw new IllegalStateException("Unexpected value: " + sourceNodes); //fixme
58+
default -> throw new IllegalStateException("Unexpected value: " + sourceNodes);
5959
};
6060
}
6161

@@ -70,7 +70,7 @@ private static NodeWithValue[] createDemand(InputNodes targetNodes, Graph graph,
7070
graph.toMappedNodeId(entry.getKey()),
7171
entry.getValue()
7272
)).toArray(NodeWithValue[]::new);
73-
default -> throw new IllegalStateException("Unexpected value: " + targetNodes); //fixme
73+
default -> throw new IllegalStateException("Unexpected value: " + targetNodes);
7474
};
7575
}
7676
}

algo/src/test/java/org/neo4j/gds/maxflow/MaxFlowTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Graph generateUniform(long nodeCount, int avgDegree) {
8282

8383
void testGraph(Graph graph, InputNodes sourceNodes, InputNodes targetNodes, double expectedFlow, int concurrency) {
8484
var params = new MaxFlowParameters(sourceNodes, targetNodes, new Concurrency(concurrency), ALPHA, BETA, FREQ);
85-
var x = new MaxFlow(graph, params, null, null); //fixme
85+
var x = new MaxFlow(graph, params, null, null);
8686
var result = x.compute();
8787
assertThat(result.totalFlow()).isCloseTo(expectedFlow, Offset.offset(TOLERANCE));
8888
}

0 commit comments

Comments
 (0)