kiddo_v1
kiddo_v1 copied to clipboard
Integer as key
Is support for discrete index type planned ?
Using u32 as dimension can be useful in many fields. My usage is a sparse 3d grid for discrete physics simulation.
This would be nice to have. The problem at the moment is the Float
trait bound on the generic type used for the coordinate system](https://github.com/sdd/kiddo/blob/master/src/kiddo.rs#L82). This is needed due to the use of A::infinity()
and A::negative_infinity()
for boundary conditions, which are not available for primitive integer types.
We could have multiple impl<A, T: std::cmp::PartialEq, const K: usize> KdTree<A, T, K>blocks, with each having different bounds for
A`: the existing one for floats, one for unsigned ints, and one for signed ints.
I'm a bit busy to take this on myself at the moment, but happy to consider submissions from anyone who wants to take a crack at this.
This is now available in the v2 version of Kiddo which is currently in beta.