Closed NnannaOmoke closed 4 weeks ago
i.e. something like this would not work:
let tree = points.rows().into_iter().map(|row| row.to_vec()).collect::<Vec<Vec<f64>>>();
//assume that points is an `ndarray`
let tree = KdTree<f64, 2> = (&tree).into();
Even though this is a very points
agnostic way of creating KdTree
s
Unfortunately yes, Kiddo does not support creating trees whose dimensionality is not known at compile time. This is due to the use of arrays rather than Vecs for performance.
This means that you cannot build a
KdTree
from a vector of vectors/slices, which severely limits the functionality to use cases where the dimensions of the input are hard coded in.