stefankoegl / kdtree

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

A question in _search_node() #27

Closed chaomai closed 8 years ago

chaomai commented 8 years ago

When adding new a node to results(at line 480), why don't you pop the node that has the highest distance if the length of results is k?

stefankoegl commented 8 years ago

I haven't touched this code in quite some time, so I am not totally sure. However it seems that what you suggest might be the correct thing to do.

Can you submit a pull request with the suggested change?

chaomai commented 8 years ago

Any way, thank you. I'll modify the code and do some tests to verify my guess.