+
+# Base for all data structures containing multiple Boxed Objects
+interface BoxedCollection[E: Boxed[Numeric]]
+ super SimpleCollection[E]
+
+ # returns all the items overlapping with `region`
+ fun items_overlapping(region :Boxed[Numeric]): SimpleCollection[E] is abstract
+end
+
+# `BoxedCollection` implemented by an array
+#
+# Linear performances for searching, but really fast creation and filling.
+class BoxedArray[E: Boxed[Numeric]]
+ super BoxedCollection[E]
+ super Array[E]
+
+ redef fun items_overlapping(item)
+ do
+ var arr = new Array[E]
+ for i in self do
+ if i.intersects(item) then arr.add(i)
+ end
+ return arr
+ end
+end