flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.24k stars 649 forks source link

Clarify in c++ documentation that the search radius is the square of the radius #100

Closed fps closed 11 years ago

fps commented 11 years ago

It seems to be documented in the C API part of the manual, but not in the C++ part. Gave us some headaches..

mariusmuja commented 11 years ago

This is dependent on the distance functor used (for example flann::L2 computes squared distances to avoid performing an additional squared root computation), however that is now true for other distance functors. The value passed to the radius search has to match to what the distance functor is computing.

I added a note in the documentation that should clarify that L2 uses squared distances.