sdd / kiddo

Kiddo
Apache License 2.0
79 stars 13 forks source link

Is there a way to initialize an ImmutableKdTree from a regular KdTree? #129

Open jqnatividad opened 7 months ago

jqnatividad commented 7 months ago

First off, thanks for the wonderful library @sdd !

To my query, I have a fairly involved algorithm that initializes a KdTree and it works.

After the KdTree is populated, I then serialize and persist it to a file for future use, and the tree is functionally immutable.

Would it be possible to initialize an ImmutableKdTree from the KdTree? I can then just serialize the ImmutableKdTree and get the performance benefits without materially changing my existing tree population algorithm.

sdd commented 5 months ago

This would for sure be a great feature. The ergonomics around serializing via rkyv could also be improved. I'll get around to looking at this once the bugs in ImmutableKdTree get fixed