3434import org .neo4j .gds .termination .TerminationFlag ;
3535
3636import java .util .Optional ;
37- import java .util .concurrent .ExecutorService ;
3837
3938/**
4039 * Filtered KNN is the same as ordinary KNN, _but_ we allow users to regulate final output in two ways.
@@ -83,7 +82,7 @@ public static FilteredKnn createWithDefaultSeeding(
8382 *
8483 * @param optionalSimilarityFunction An actual similarity function if you want seeding, empty otherwise
8584 */
86- static FilteredKnn create (
85+ private static FilteredKnn create (
8786 Graph graph ,
8887 FilteredKnnParameters parameters ,
8988 KnnContext context ,
@@ -119,21 +118,19 @@ static FilteredKnn create(
119118 terminationFlag
120119 );
121120
122- return new FilteredKnn (context .progressTracker (), knn , targetNodeFiltering , sourceNodeFilter , terminationFlag );
121+ return new FilteredKnn (context .progressTracker (), knn , targetNodeFiltering , sourceNodeFilter );
123122 }
124123
125124 private FilteredKnn (
126125 ProgressTracker progressTracker ,
127126 Knn delegate ,
128127 StreamProducingTargetNodeFiltering targetNodeFiltering ,
129- NodeFilter sourceNodeFilter ,
130- TerminationFlag terminationFlag
128+ NodeFilter sourceNodeFilter
131129 ) {
132130 super (progressTracker );
133131 this .delegate = delegate ;
134132 this .targetNodeFiltering = targetNodeFiltering ;
135133 this .sourceNodeFilter = sourceNodeFilter ;
136- this .terminationFlag = terminationFlag ;
137134 }
138135
139136 @ Override
@@ -154,8 +151,4 @@ public FilteredKnnResult compute() {
154151 sourceNodeFilter
155152 );
156153 }
157-
158- ExecutorService executorService () {
159- return delegate .executorService ();
160- }
161154}
0 commit comments