From 9a4bd158df6b0347931fe5b9a6d6f4f4eec2dbf8 Mon Sep 17 00:00:00 2001 From: Tilmann Date: Sun, 11 Aug 2024 16:19:32 +0200 Subject: [PATCH] BallTree WIP --- CHANGELOG.md | 2 ++ src/test/java/org/tinspin/index/test/PointMultimapTest.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6e48b..6d7aa39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +TODO implement extent/iterator(), see mokeTest line 150 (Map) and 165 (MultiMap) + - Nothing yet ## [2.1.4] - 2024-08-01 diff --git a/src/test/java/org/tinspin/index/test/PointMultimapTest.java b/src/test/java/org/tinspin/index/test/PointMultimapTest.java index a6a7c6e..da06bda 100644 --- a/src/test/java/org/tinspin/index/test/PointMultimapTest.java +++ b/src/test/java/org/tinspin/index/test/PointMultimapTest.java @@ -51,6 +51,7 @@ public static Iterable candidates() { ArrayList l = new ArrayList<>(); // l.add(new Object[]{IDX.ARRAY}); // l.add(new Object[]{IDX.COVER}); + l.add(new Object[]{IDX.BALL}); l.add(new Object[]{IDX.KDTREE}); l.add(new Object[]{IDX.PHTREE_MM}); l.add(new Object[]{IDX.QUAD_HC}); @@ -160,7 +161,7 @@ private void smokeTest(List data) { } if (candidate != IDX.COVER && candidate != IDX.KDTREE && candidate != IDX.QUAD_PLAIN - && candidate != IDX.QUAD_HC && candidate != IDX.QUAD_HC2) { + && candidate != IDX.QUAD_HC && candidate != IDX.QUAD_HC2 && candidate != IDX.BALL) { int nExtent = 0; PointIterator extent = tree.iterator(); while (extent.hasNext()) { @@ -382,6 +383,8 @@ private PointMultimap createTree(int size, int dims) { switch (candidate) { case ARRAY: return PointMultimap.Factory.createArray(dims, size); + case BALL: + return PointMultimap.Factory.createKdTree(dims); // //case CRITBIT: return new PointArray<>(dims, size); case KDTREE: return PointMultimap.Factory.createKdTree(dims);