|
28 | 28 | import org.neo4j.gds.approxmaxkcut.ApproxMaxKCutResult; |
29 | 29 | import org.neo4j.gds.cliqueCounting.CliqueCountingResult; |
30 | 30 | import org.neo4j.gds.cliquecounting.CliqueCountingParameters; |
| 31 | +import org.neo4j.gds.collections.ha.HugeLongArray; |
31 | 32 | import org.neo4j.gds.community.validation.ApproxMaxKCutValidation; |
32 | 33 | import org.neo4j.gds.community.validation.UndirectedAndSeedableGraphStoreValidation; |
33 | 34 | import org.neo4j.gds.conductance.ConductanceParameters; |
|
59 | 60 | import org.neo4j.gds.modularityoptimization.ModularityOptimizationResult; |
60 | 61 | import org.neo4j.gds.result.TimedAlgorithmResult; |
61 | 62 | import org.neo4j.gds.results.ResultTransformerBuilder; |
| 63 | +import org.neo4j.gds.scc.SccParameters; |
62 | 64 | import org.neo4j.gds.triangle.LocalClusteringCoefficientParameters; |
63 | 65 | import org.neo4j.gds.triangle.LocalClusteringCoefficientResult; |
64 | 66 |
|
@@ -476,5 +478,34 @@ public <TR> CompletableFuture<TR> modularityOptimization( |
476 | 478 | ).thenApply(resultTransformerBuilder.build(graphResources)); |
477 | 479 | } |
478 | 480 |
|
| 481 | + public <TR> CompletableFuture<TR> scc( |
| 482 | + GraphName graphName, |
| 483 | + GraphParameters graphParameters, |
| 484 | + Optional<String> relationshipProperty, |
| 485 | + SccParameters parameters, |
| 486 | + JobId jobId, |
| 487 | + boolean logProgress, |
| 488 | + ResultTransformerBuilder<TimedAlgorithmResult<HugeLongArray>, TR> resultTransformerBuilder |
| 489 | + ) { |
| 490 | + // Fetch the Graph the algorithm will operate on |
| 491 | + var graphResources = graphStoreCatalogService.fetchGraphResources( |
| 492 | + graphName, |
| 493 | + graphParameters, |
| 494 | + relationshipProperty, |
| 495 | + new NoAlgorithmValidation(), |
| 496 | + Optional.empty(), |
| 497 | + user, |
| 498 | + databaseId |
| 499 | + ); |
| 500 | + var graph = graphResources.graph(); |
| 501 | + |
| 502 | + return computeFacade.scc( |
| 503 | + graph, |
| 504 | + parameters, |
| 505 | + jobId, |
| 506 | + logProgress |
| 507 | + |
| 508 | + ).thenApply(resultTransformerBuilder.build(graphResources)); |
| 509 | + } |
479 | 510 |
|
480 | 511 | } |
0 commit comments