Bersaelor / KDTree

Swift implementation of a k-dimensional binary space partitioning tree.
MIT License
155 stars 27 forks source link

only check node value if... #15

Closed hsnetzer closed 7 years ago

hsnetzer commented 7 years ago

During NN search, only check the node value if the best distance hypersphere intersects the splitting hyperplane. The node's value lies on the splitting hyperplane.

Bersaelor commented 7 years ago

@hsnetzer Sure, might chafe off some unnecessary cpu-cycles.

Tests failed to start the simulator so I restarted them (happens sometimes on travis).

Bersaelor commented 7 years ago

Thank you @hsnetzer :)

hsnetzer commented 7 years ago

Haha, not really an improvement, but more readable to me.

Bersaelor commented 7 years ago

@hsnetzer I see you work with php? Are you using the KDTree in a web environment?

I recently applied it to a simple Kitura App and pushed the sample app live. Server-Side Swift is really fun these days :)

hsnetzer commented 7 years ago

Started learning php back when i thought it was how people made web apps... ultimately I went with Node for my site http://bighike.net. I looked at kitura but it seemed like node was easier for my purpose. I'm going to look at your code. Probably going to make me wish I stayed in Swift.

Cool site by the way. Very fast :)

Look forward to experimenting more with your kd-tree in my mobile app when we get enum serialization.

Best,

Harry

On Wed, Aug 9, 2017 at 2:21 PM, Konrad Feiler notifications@github.com wrote:

@hsnetzer https://github.com/hsnetzer I see you work with php? Are you using the KDTree in a web environment?

I recently applied it to a simple Kitura App https://github.com/Bersaelor/StarsOnKitura and pushed the sample app live https://starsonkitura.eu-de.mybluemix.net. Server-Side Swift is really fun these days :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Bersaelor/KDTree/pull/15#issuecomment-321339873, or mute the thread https://github.com/notifications/unsubscribe-auth/AR0lpcO6-XoUAhR2cJ7B6fr_3dKOY5-zks5sWfi8gaJpZM4Oxb5i .