Coder Social home page Coder Social logo

Comments (3)

KristofferC avatar KristofferC commented on May 16, 2024 1

So the tree search method doesn't provide any side effects like order by distance for free?

For knn, yes but for in_range it is possible to determine that all points in a branch of the tree are in range without having to compute the distance for all points in that branch.

from nearestneighbors.jl.

KristofferC avatar KristofferC commented on May 16, 2024

See:

Note that for performance reasons the distances are not returned.

inrange is made fast is by not computing the distances when that is not needed to know if the point is in range or not. You would need to call the distance function on all points yourself afterwards since that is not any information we have stored anywhere.

FWIW, the sortres option for inrange should probably be removed, it doesn't really do anything useful.

from nearestneighbors.jl.

juliohm avatar juliohm commented on May 16, 2024

FWIW, the sortres option for inrange should probably be removed, it doesn't really do anything useful.

I agree, I thought the option was doing the sort by distance. I would just remove it to avoid future confusion by other users.

So the tree search method doesn't provide any side effects like order by distance for free? I will call inrange, and then calculate the distances if that is needed. Thanks.

from nearestneighbors.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.