@@ -37,15 +37,15 @@ public class HDBScan extends Algorithm<HugeLongArray> {
3737 private final Concurrency concurrency ;
3838 private final long leafSize ;
3939 private final TerminationFlag terminationFlag ;
40- private final int k ;
40+ private final int samples ;
4141 private final long minClusterSize ;
4242
4343 protected HDBScan (
4444 IdMap nodes ,
4545 NodePropertyValues nodePropertyValues ,
4646 Concurrency concurrency ,
4747 long leafSize ,
48- int k ,
48+ int samples ,
4949 long minClusterSize ,
5050 ProgressTracker progressTracker ,
5151 TerminationFlag terminationFlag
@@ -55,7 +55,7 @@ protected HDBScan(
5555 this .nodePropertyValues = nodePropertyValues ;
5656 this .concurrency = concurrency ;
5757 this .leafSize = leafSize ;
58- this .k = k ;
58+ this .samples = samples ;
5959 this .minClusterSize = minClusterSize ;
6060 this .terminationFlag = terminationFlag ;
6161 }
@@ -66,13 +66,12 @@ public HugeLongArray compute() {
6666
6767 var nodeCount = nodes .nodeCount ();
6868 var coreResult = computeCores (kdTree , nodeCount );
69- // var dualTreeMST = dualTreeMSTPhase();
7069 var dualTreeMST = dualTreeMSTPhase (kdTree , coreResult );
7170 var clusterHierarchy = createClusterHierarchy (dualTreeMST );
7271 var condenseStep = new CondenseStep (nodeCount );
7372 var condensedTree = condenseStep .condense (clusterHierarchy , minClusterSize );
7473 var labellingStep = new LabellingStep (condensedTree , nodeCount );
75- return labellingStep .label ();
74+ return labellingStep .labels ();
7675 }
7776
7877 CoreResult computeCores (KdTree kdTree , long nodeCount ) {
@@ -81,7 +80,7 @@ CoreResult computeCores(KdTree kdTree, long nodeCount) {
8180 ParallelUtil .parallelForEachNode (
8281 nodeCount , concurrency , terminationFlag ,
8382 (nodeId ) -> {
84- neighbours .set (nodeId , kdTree .neighbours (nodeId , k ));
83+ neighbours .set (nodeId , kdTree .neighbours (nodeId , samples ));
8584 }
8685 );
8786
0 commit comments