Skip to content

Commit 6c3bcbf

Browse files
committed
Updated documentation mentioning that L2 computes squared distances
1 parent 0fba4ec commit 6c3bcbf

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

doc/manual.pdf

530 Bytes
Binary file not shown.

doc/manual.tex

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,11 @@ \subsubsection{flann::Index::knnSearch}
670670
\item[indices]{Matrix that will contain the indices of the K-nearest neighbors found (size should be at least
671671
$num\_queries \times knn$ for the pre-allocated version).}
672672
\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+
}
674678
\item[knn]{Number of nearest neighbors to search for.}
675679
\item[params]{Search parameters.} Structure containing parameters used during search.
676680

@@ -737,9 +741,15 @@ \subsubsection{flann::Index::radiusSearch}
737741
will be resized as needed to fit all the neighbors to be returned, except if the ``max\_neighbors'' search parameter is
738742
set.}
739743
\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.}
743753
\end{description}
744754
The method returns the number of nearest neighbors found.
745755

0 commit comments

Comments
 (0)