rtree2d icon indicating copy to clipboard operation
rtree2d copied to clipboard

Allow use of any numeric type to store the R-tree instead of just Float

Open benwbooth opened this issue 6 years ago • 1 comments

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.

benwbooth avatar Jun 18 '18 15:06 benwbooth

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.

plokhotnyuk avatar Jun 18 '18 15:06 plokhotnyuk