Skip to content

Commit 79938c8

Browse files
committed
Bootstrap PushbackPathFindingWriteProcedureFacade
1 parent a575fcc commit 79938c8

File tree

8 files changed

+789
-16
lines changed

8 files changed

+789
-16
lines changed

procedures/pushback-procedures-facade/src/main/java/org/neo4j/gds/procedures/algorithms/pathfinding/PushbackPathFindingProcedureFacade.java

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
import org.neo4j.gds.procedures.algorithms.pathfinding.stats.PushbackPathFindingStatsProcedureFacade;
2626
import org.neo4j.gds.procedures.algorithms.pathfinding.stream.PushbackPathFindingStreamProcedureFacade;
2727
import org.neo4j.gds.procedures.algorithms.pathfinding.stubs.PathFindingStubs;
28+
import org.neo4j.gds.procedures.algorithms.pathfinding.write.PushbackPathFindingWriteProcedureFacade;
2829
import org.neo4j.gds.procedures.algorithms.results.StandardModeResult;
2930
import org.neo4j.gds.procedures.algorithms.results.StandardStatsResult;
31+
import org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult;
3032

3133
import java.util.Map;
3234
import java.util.stream.Stream;
@@ -36,15 +38,18 @@ public final class PushbackPathFindingProcedureFacade implements PathFindingProc
3638
private final PushbackPathFindingMutateProcedureFacade mutateProcedureFacade;
3739
private final PushbackPathFindingStatsProcedureFacade statsProcedureFacade;
3840
private final PushbackPathFindingStreamProcedureFacade streamProcedureFacade;
41+
private final PushbackPathFindingWriteProcedureFacade writeProcedureFacade;
3942

4043
public PushbackPathFindingProcedureFacade(
4144
PushbackPathFindingMutateProcedureFacade mutateProcedureFacade,
4245
PushbackPathFindingStatsProcedureFacade statsProcedureFacade,
43-
PushbackPathFindingStreamProcedureFacade streamProcedureFacade
46+
PushbackPathFindingStreamProcedureFacade streamProcedureFacade,
47+
PushbackPathFindingWriteProcedureFacade writeProcedureFacade
4448
) {
4549
this.mutateProcedureFacade = mutateProcedureFacade;
4650
this.statsProcedureFacade = statsProcedureFacade;
4751
this.streamProcedureFacade = streamProcedureFacade;
52+
this.writeProcedureFacade = writeProcedureFacade;
4853
}
4954

5055
@Override
@@ -109,7 +114,7 @@ public Stream<MemoryEstimateResult> bellmanFordStatsEstimate(
109114

110115
@Override
111116
public Stream<BellmanFordWriteResult> bellmanFordWrite(String graphName, Map<String, Object> configuration) {
112-
return Stream.empty();
117+
return writeProcedureFacade.bellmanFord(graphName, configuration);
113118
}
114119

115120
@Override
@@ -208,11 +213,11 @@ public Stream<MemoryEstimateResult> deltaSteppingStreamEstimate(
208213
}
209214

210215
@Override
211-
public Stream<org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult> deltaSteppingWrite(
216+
public Stream<StandardWriteRelationshipsResult> deltaSteppingWrite(
212217
String graphName,
213218
Map<String, Object> configuration
214219
) {
215-
return Stream.empty();
220+
return writeProcedureFacade.deltaStepping(graphName, configuration);
216221
}
217222

218223
@Override
@@ -251,7 +256,7 @@ public Stream<MemoryEstimateResult> depthFirstSearchStreamEstimate(
251256

252257
@Override
253258
public Stream<KSpanningTreeWriteResult> kSpanningTreeWrite(String graphName, Map<String, Object> configuration) {
254-
return Stream.empty();
259+
return writeProcedureFacade.kSpanningTree(graphName, configuration);
255260
}
256261

257262
@Override
@@ -312,7 +317,7 @@ public Stream<PrizeCollectingSteinerTreeWriteResult> prizeCollectingSteinerTreeW
312317
String graphName,
313318
Map<String, Object> configuration
314319
) {
315-
return Stream.empty();
320+
return writeProcedureFacade.pcst(graphName, configuration);
316321
}
317322

318323
@Override
@@ -398,11 +403,11 @@ public Stream<MemoryEstimateResult> singlePairShortestPathAStarMutateEstimate(
398403
}
399404

400405
@Override
401-
public Stream<org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult> singlePairShortestPathAStarWrite(
406+
public Stream<StandardWriteRelationshipsResult> singlePairShortestPathAStarWrite(
402407
String graphName,
403408
Map<String, Object> configuration
404409
) {
405-
return Stream.empty();
410+
return writeProcedureFacade.singlePairShortestPathAStar(graphName, configuration);
406411
}
407412

408413
@Override
@@ -446,11 +451,11 @@ public Stream<MemoryEstimateResult> singlePairShortestPathDijkstraMutateEstimate
446451
}
447452

448453
@Override
449-
public Stream<org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult> singlePairShortestPathDijkstraWrite(
454+
public Stream<StandardWriteRelationshipsResult> singlePairShortestPathDijkstraWrite(
450455
String graphName,
451456
Map<String, Object> configuration
452457
) {
453-
return Stream.empty();
458+
return writeProcedureFacade.singlePairShortestPathDijkstra(graphName, configuration);
454459
}
455460

456461
@Override
@@ -494,11 +499,11 @@ public Stream<MemoryEstimateResult> singlePairShortestPathYensMutateEstimate(
494499
}
495500

496501
@Override
497-
public Stream<org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult> singlePairShortestPathYensWrite(
502+
public Stream<StandardWriteRelationshipsResult> singlePairShortestPathYensWrite(
498503
String graphName,
499504
Map<String, Object> configuration
500505
) {
501-
return Stream.empty();
506+
return writeProcedureFacade.singlePairShortestPathYens(graphName, configuration);
502507
}
503508

504509
@Override
@@ -542,11 +547,11 @@ public Stream<MemoryEstimateResult> singleSourceShortestPathDijkstraMutateEstima
542547
}
543548

544549
@Override
545-
public Stream<org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult> singleSourceShortestPathDijkstraWrite(
550+
public Stream<StandardWriteRelationshipsResult> singleSourceShortestPathDijkstraWrite(
546551
String graphName,
547552
Map<String, Object> configuration
548553
) {
549-
return Stream.empty();
554+
return writeProcedureFacade.singleSourceShortestPathDijkstra(graphName, configuration);
550555
}
551556

552557
@Override
@@ -598,7 +603,7 @@ public Stream<MemoryEstimateResult> spanningTreeStreamEstimate(
598603

599604
@Override
600605
public Stream<SpanningTreeWriteResult> spanningTreeWrite(String graphName, Map<String, Object> configuration) {
601-
return Stream.empty();
606+
return writeProcedureFacade.spanningTree(graphName, configuration);
602607
}
603608

604609
@Override
@@ -650,7 +655,7 @@ public Stream<MemoryEstimateResult> steinerTreeStreamEstimate(
650655

651656
@Override
652657
public Stream<SteinerWriteResult> steinerTreeWrite(String graphName, Map<String, Object> configuration) {
653-
return Stream.empty();
658+
return writeProcedureFacade.steinerTree(graphName, configuration);
654659
}
655660

656661
@Override
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) "Neo4j"
3+
* Neo4j Sweden AB [http://neo4j.com]
4+
*
5+
* This file is part of Neo4j.
6+
*
7+
* Neo4j is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.neo4j.gds.procedures.algorithms.pathfinding.write;
21+
22+
import org.neo4j.gds.api.Graph;
23+
import org.neo4j.gds.api.GraphStore;
24+
import org.neo4j.gds.paths.bellmanford.AllShortestPathsBellmanFordWriteConfig;
25+
import org.neo4j.gds.paths.bellmanford.BellmanFordResult;
26+
import org.neo4j.gds.procedures.algorithms.pathfinding.BellmanFordWriteResult;
27+
import org.neo4j.gds.result.TimedAlgorithmResult;
28+
import org.neo4j.gds.results.ResultTransformer;
29+
import org.neo4j.gds.results.ResultTransformerBuilder;
30+
31+
import java.util.stream.Stream;
32+
33+
class BellmanFordWriteResultTransformerBuilder implements ResultTransformerBuilder<TimedAlgorithmResult<BellmanFordResult>, Stream<BellmanFordWriteResult>> {
34+
BellmanFordWriteResultTransformerBuilder(AllShortestPathsBellmanFordWriteConfig config) {}
35+
36+
@Override
37+
public ResultTransformer<TimedAlgorithmResult<BellmanFordResult>, Stream<BellmanFordWriteResult>> build(Graph graph, GraphStore graphStore) {
38+
return ar -> Stream.empty();
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) "Neo4j"
3+
* Neo4j Sweden AB [http://neo4j.com]
4+
*
5+
* This file is part of Neo4j.
6+
*
7+
* Neo4j is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.neo4j.gds.procedures.algorithms.pathfinding.write;
21+
22+
import org.neo4j.gds.api.Graph;
23+
import org.neo4j.gds.api.GraphStore;
24+
import org.neo4j.gds.paths.delta.config.AllShortestPathsDeltaWriteConfig;
25+
import org.neo4j.gds.paths.dijkstra.PathFindingResult;
26+
import org.neo4j.gds.procedures.algorithms.results.StandardWriteRelationshipsResult;
27+
import org.neo4j.gds.result.TimedAlgorithmResult;
28+
import org.neo4j.gds.results.ResultTransformer;
29+
import org.neo4j.gds.results.ResultTransformerBuilder;
30+
31+
import java.util.stream.Stream;
32+
33+
class DeltaSteppingWriteResultTransformerBuilder implements ResultTransformerBuilder<TimedAlgorithmResult<PathFindingResult>, Stream<StandardWriteRelationshipsResult>> {
34+
DeltaSteppingWriteResultTransformerBuilder(AllShortestPathsDeltaWriteConfig config) {}
35+
36+
@Override
37+
public ResultTransformer<TimedAlgorithmResult<PathFindingResult>, Stream<StandardWriteRelationshipsResult>> build(Graph graph, GraphStore graphStore) {
38+
return ar -> Stream.empty();
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) "Neo4j"
3+
* Neo4j Sweden AB [http://neo4j.com]
4+
*
5+
* This file is part of Neo4j.
6+
*
7+
* Neo4j is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.neo4j.gds.procedures.algorithms.pathfinding.write;
21+
22+
import org.neo4j.gds.api.Graph;
23+
import org.neo4j.gds.api.GraphStore;
24+
import org.neo4j.gds.pcst.PCSTWriteConfig;
25+
import org.neo4j.gds.pricesteiner.PrizeSteinerTreeResult;
26+
import org.neo4j.gds.procedures.algorithms.pathfinding.PrizeCollectingSteinerTreeWriteResult;
27+
import org.neo4j.gds.result.TimedAlgorithmResult;
28+
import org.neo4j.gds.results.ResultTransformer;
29+
import org.neo4j.gds.results.ResultTransformerBuilder;
30+
31+
import java.util.stream.Stream;
32+
33+
class PCSTWriteResultTransformerBuilder implements ResultTransformerBuilder<TimedAlgorithmResult<PrizeSteinerTreeResult>, Stream<PrizeCollectingSteinerTreeWriteResult>> {
34+
PCSTWriteResultTransformerBuilder(PCSTWriteConfig config) {}
35+
36+
@Override
37+
public ResultTransformer<TimedAlgorithmResult<PrizeSteinerTreeResult>, Stream<PrizeCollectingSteinerTreeWriteResult>> build(
38+
Graph graph,
39+
GraphStore graphStore
40+
) {
41+
return ar -> Stream.empty();
42+
}
43+
}

0 commit comments

Comments
 (0)