summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-07-06 22:24:02 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-07-06 22:33:10 -0400
commit5f85a59d4be37d350bcf1ee62c25ac1f84d71770 (patch)
tree8fc7ea8e59226c5e677d7b9aef39b0b2be5f28b7 /src/lib.rs
parented4d7b7143f1a8a9602698ca3e60e18bbb4dd226 (diff)
downloadacap-5f85a59d4be37d350bcf1ee62c25ac1f84d71770.tar.xz
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).
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 3 insertions, 3 deletions
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<T, F>(from_iter: F)
+ /// Test an [ExactNeighbors] implementation.
+ pub fn test_exact_neighbors<T, F>(from_iter: F)
where
- T: NearestNeighbors<Point>,
+ T: ExactNeighbors<Point>,
F: Fn(Vec<Point>) -> T,
{
test_empty(&from_iter);