sdd / kiddo_v1

K-dimensional tree in Rust for fast geospatial indexing and lookup
Apache License 2.0
29 stars 11 forks source link

[Feature Request] Comparing trees #29

Open netthier opened 2 years ago

netthier commented 2 years ago

There currently seems to be no way of determining if two trees contain the same points and values. This could be implemented by implementing something like IntoIterator over all points for KdTree, which can then be collected, sorted and compared by the user.

sdd commented 2 years ago

Thanks for the suggestion. You're correct, there's no way to do this at present, but I don't see it as being too difficult to implement. Effectively an iterator where each entry in the iterator is a tuple of each item's co-ordinates and node content.

I'll add this to the backlog - also happy to accept pull requests for implementations of this 👍🏼