rtree2d
rtree2d copied to clipboard
Allow use of any numeric type to store the R-tree instead of just Float
It would be nice if more numeric types were supported instead of just Float, e.g. Double, Int, Long, BigInt, BigDecimal. Can the numeric type be generalized? This would be useful for image manipulatoin tasks where fractional numbers are not possible.
Yes, currently it is locked on floats, and I afraid that generalization will add too much overhead for CPU usage and memory footprint.
BTW, precision of floats is quite good and allows to operate with images which have 16M width and/or height with exact precision.
IMHO the image manipulation domain worth its own implementation of R-tree. Feel free to grab RTree2D ideas and improve existent implementations for that domain.
Another option would be using of Scala macros to generate specialized versions, but it will not be valuable until lot of specific features that are required for image manipulation be added.