Skip to content

Commit

Permalink
Empty tree getStats()
Browse files Browse the repository at this point in the history
  • Loading branch information
tzaeschke committed Jun 22, 2024
1 parent fafc04b commit 1d0631f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/ch/ethz/globis/phtree/test/TestMultiMapF2.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ public void testKNN() {
assertTrue(3 <= result.size());

result = toList(idx.nearestNeighbour(1, 1, 1));
assertTrue(!result.isEmpty());
assertFalse(result.isEmpty());
check(result.get(0).getKey(), 1, 1);

result = toList(idx.nearestNeighbour(1, 1, 3));
assertTrue(!result.isEmpty());
assertFalse(result.isEmpty());
check(result.get(0).getKey(), 1, 3);

result = toList(idx.nearestNeighbour(1, 3, 1));
assertTrue(!result.isEmpty());
assertFalse(result.isEmpty());
check(result.get(0).getKey(), 3, 1);
}

Expand Down Expand Up @@ -274,7 +274,7 @@ public void testKnnLarge() {
v[j] = R.nextDouble() * MAXV;
}
list.forEach(xx -> xx.dist = dist(v, xx.key));
list.sort((o1, o2) -> Double.compare(o1.dist, o2.dist));
list.sort(Comparator.comparingDouble(o -> o.dist));
List<PhEntryDistF<Integer>> nnList = toList(q.reset(MIN_RESULT, PhDistanceF.THIS, v));
assertFalse("i=" + i + " d=" + d, nnList.isEmpty());
for (int x = 0; x < MIN_RESULT; ++x) {
Expand Down

0 comments on commit 1d0631f

Please sign in to comment.