@@ -670,7 +670,11 @@ \subsubsection{flann::Index::knnSearch}
670
670
\item [indices]{Matrix that will contain the indices of the K-nearest neighbors found (size should be at least
671
671
$ num\_ queries \times knn$ for the pre-allocated version).}
672
672
\item [dists]{Matrix that will contain the distances to the K-nearest neighbors found (size should be at least
673
- $ num\_ queries \times knn$ for the pre-allocated version).}
673
+ $ num\_ queries \times knn$ for the pre-allocated version). \\
674
+ \emph {Note: } For Euclidean distances, the \texttt {flann::L2 } functor computes squared distances,
675
+ so the value passed here needs to be a squared
676
+ distance as well.
677
+ }
674
678
\item [knn]{Number of nearest neighbors to search for.}
675
679
\item [params]{Search parameters.} Structure containing parameters used during search.
676
680
@@ -737,9 +741,15 @@ \subsubsection{flann::Index::radiusSearch}
737
741
will be resized as needed to fit all the neighbors to be returned, except if the `` max\_ neighbors'' search parameter is
738
742
set.}
739
743
\item [dists]{Matrix that will contain the distances to the K-nearest neighbors found. The same number of values are
740
- returned here as for the \texttt {indices } matrix.}
741
- \item [radius]{The search radius}
742
- \item [params]{Search parameters}
744
+ returned here as for the \texttt {indices } matrix. \\
745
+ \emph {Note: } For Euclidean distances, the
746
+ \texttt {flann::L2 } functor computes squared distances, so the value passed here needs to
747
+ be a squared distance as well.}
748
+ \item [radius]{The search radius. \\
749
+ \emph {Note: } For Euclidean distances, the \texttt {flann::L2 } functor computes squared distances,
750
+ so the value passed here needs to be a squared
751
+ distance as well.}
752
+ \item [params]{Search parameters.}
743
753
\end {description }
744
754
The method returns the number of nearest neighbors found.
745
755
0 commit comments