@Test public void testSizeRandom() { int N = 10; for (int i = 0; i < 10; i++, N <<= 1) { RangeSearchBST<Integer, Integer> test = new RangeSearchBST<>(); int[] testData = Shuffler.getRandomArray(N, -N, N); for (int data : testData) test.put(data, data); Arrays.sort(testData); for (int j = 0; j < 100; j++) { int a = -N + random.nextInt(2 * N), b = -N + random.nextInt(2 * N); int hi = Math.max(a, b), lo = Math.min(a, b); Assert.assertEquals(expectSize(testData, lo, hi), test.size(lo, hi)); } } }
public int size(Key lo, Key hi) { return 0; }
RangeSearchBST extends RedBlackBSTWithNoExtraMemory<Key, Val> { public int size(Key lo, Key hi) { return 0; } }
RangeSearchBST extends RedBlackBSTWithNoExtraMemory<Key, Val> { public int size(Key lo, Key hi) { return 0; }  }
RangeSearchBST extends RedBlackBSTWithNoExtraMemory<Key, Val> { public int size(Key lo, Key hi) { return 0; }  int size(Key lo, Key hi); List<Key> search(Key lo, Key hi); }
RangeSearchBST extends RedBlackBSTWithNoExtraMemory<Key, Val> { public int size(Key lo, Key hi) { return 0; }  int size(Key lo, Key hi); List<Key> search(Key lo, Key hi);  }