stefankoegl / kdtree

A Python implementation of a kd-tree
ISC License
365 stars 118 forks source link

bucket kd-trees #41

Open Maryom opened 6 years ago

Maryom commented 6 years ago

Hi,

Thanks for your repo.

I'm wondering it is possible to add bucket kd-trees ? I found Matlab code of it. However, I need it in python.

Thanks.

stefankoegl commented 6 years ago

Hi,

Could you please describe how a bucket kd-tree is supposed to work?

Thanks!

Maryom commented 6 years ago

Thanks for your fast reply.

Kindly, check this document:

Bucket means points are collected in leaves until they overflow. Only then are they split. This makes the tree more likely to be balanced since we can choose a smarter splitting point than whatever we receive first.

Do you think it will be easy to add bucket to this repo. ?

Thanks.

stefankoegl commented 6 years ago

The fact that each node corresponds to one point (and has up to two sub nodes) is a basic assumption of the kdtree module. Such a change would probably affect many parts of the whole data structure.

As I do not have sufficient time at the moment, I will not be able to implement this in the foreseeable future, I would however be available for reviewing any pull requests.

Maryom commented 6 years ago

Ok thanks. Maybe I will pull a request to do it. I'm thinking and I'm searching.