File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
algorithms-compute-business-facade/src/main/java/org/neo4j/gds/community Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 3434import org .neo4j .gds .core .loading .GraphStoreCatalogService ;
3535import org .neo4j .gds .core .loading .validation .NodePropertyAnyExistsGraphStoreValidation ;
3636import org .neo4j .gds .core .loading .validation .UndirectedOnlyGraphStoreValidation ;
37+ import org .neo4j .gds .hdbscan .HDBScanParameters ;
38+ import org .neo4j .gds .hdbscan .Labels ;
3739import org .neo4j .gds .result .TimedAlgorithmResult ;
3840import org .neo4j .gds .results .ResultTransformerBuilder ;
3941
@@ -152,4 +154,34 @@ public <TR> CompletableFuture<TR> conductance(
152154 ).thenApply (resultTransformerBuilder .build (graphResources ));
153155 }
154156
157+ public <TR > CompletableFuture <TR > hdbscan (
158+ GraphName graphName ,
159+ GraphParameters graphParameters ,
160+ Optional <String > relationshipProperty ,
161+ HDBScanParameters parameters ,
162+ JobId jobId ,
163+ boolean logProgress ,
164+ ResultTransformerBuilder <TimedAlgorithmResult <Labels >, TR > resultTransformerBuilder
165+ ) {
166+ // Fetch the Graph the algorithm will operate on
167+ var graphResources = graphStoreCatalogService .fetchGraphResources (
168+ graphName ,
169+ graphParameters ,
170+ relationshipProperty ,
171+ new NodePropertyAnyExistsGraphStoreValidation ("nodeProperty" ),
172+ Optional .empty (),
173+ user ,
174+ databaseId
175+ );
176+ var graph = graphResources .graph ();
177+
178+ return computeFacade .hdbscan (
179+ graph ,
180+ parameters ,
181+ jobId ,
182+ logProgress
183+
184+ ).thenApply (resultTransformerBuilder .build (graphResources ));
185+ }
186+
155187}
You can’t perform that action at this time.
0 commit comments