@Test public void basicTest1() { RectHV rect1 = new RectHV(0, 0, 2, 2); RectHV rect2 = new RectHV(1, 1, 3, 3); Set<RectHV> input = new HashSet<>(Arrays.asList(rect1, rect2)); Map<RectHV, Set<RectHV>> res = RectangleIntersection.findAllIntersection(input); Set<RectHV> have1 = new HashSet<>(Arrays.asList(rect1)); Set<RectHV> have2 = new HashSet<>(Arrays.asList(rect2)); Assert.assertTrue(equals(res.get(rect1), have2)); Assert.assertTrue(equals(res.get(rect2), have1)); }
public static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input) { return findAllIntersection(input, new IntervalST<>()); }
RectangleIntersection { public static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input) { return findAllIntersection(input, new IntervalST<>()); } }
RectangleIntersection { public static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input) { return findAllIntersection(input, new IntervalST<>()); }  }
RectangleIntersection { public static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input) { return findAllIntersection(input, new IntervalST<>()); }  static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input); static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input,
                                                               IntervalSearchTree<Double, RectHV> intervalST); }
RectangleIntersection { public static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input) { return findAllIntersection(input, new IntervalST<>()); }  static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input); static Map<RectHV, Set<RectHV>> findAllIntersection(Set<RectHV> input,
                                                               IntervalSearchTree<Double, RectHV> intervalST);  }