From 5f85a59d4be37d350bcf1ee62c25ac1f84d71770 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 6 Jul 2020 22:24:02 -0400 Subject: kd: Use a more traditional k-d tree implementation The slight extra pruning possible in the previous implementation didn't seem to be worth it. The new, simpler implementation is also about 30% faster in most of the benchmarks. This gets rid of Coordinate{Proximity,Metric} as they're not necessary any more (and the old ExactNeighbors impl was too restrictive anyway). --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index d6e5579..57f3dac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -464,10 +464,10 @@ pub mod tests { type Point = Euclidean<[f32; 3]>; - /// Test a [NearestNeighbors] implementation. - pub fn test_nearest_neighbors(from_iter: F) + /// Test an [ExactNeighbors] implementation. + pub fn test_exact_neighbors(from_iter: F) where - T: NearestNeighbors, + T: ExactNeighbors, F: Fn(Vec) -> T, { test_empty(&from_iter); -- cgit v1.2.3