flann-lib / flann

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

Hierarchical clustering does not work with FLANN_CHECKS_UNLIMITED #45

Open tobiaskunz opened 12 years ago

tobiaskunz commented 12 years ago

Querying a hierarchical clustering index for the nearest neighbor with SearchParams.checks set to FLANN_CHECKS_UNLIMITED gives wrong results.

The problem can be solved by changing lines 431 and 618 of hierarchical_clustering_index.h.

borellim commented 9 years ago

I've found the same issue. FLANN_CHECKS_UNLIMITED gives the same result as setting it equal to the number of nearest neighbours we are looking for.

I couldn't find an easy way to patch it, so I'm currently just setting the number of checks to a very high value. I believe "unlimited" is the same as setting the number of checks to the number of dataset points, no?

Any plans to fix this?