[mlpack-git] master, mlpack-1.0.x: Don't use the squared Euclidean distance. (bd1ff33)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:45:35 EST 2015


Repository : https://github.com/mlpack/mlpack

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit bd1ff33580fc89efa7ff530719750fe65c99c6e9
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Mar 25 14:03:12 2014 +0000

    Don't use the squared Euclidean distance.


>---------------------------------------------------------------

bd1ff33580fc89efa7ff530719750fe65c99c6e9
 doc/tutorials/neighbor_search/neighbor_search.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/tutorials/neighbor_search/neighbor_search.txt b/doc/tutorials/neighbor_search/neighbor_search.txt
index 9cbf1dd..0945b9a 100644
--- a/doc/tutorials/neighbor_search/neighbor_search.txt
+++ b/doc/tutorials/neighbor_search/neighbor_search.txt
@@ -209,7 +209,7 @@ NeighborSearch class, querying for nearest neighbors using the squared Euclidean
 distance.
 
 @code
-typedef NeighborSearch<NearestNeighborSort, metric::SquaredEuclideanDistance>
+typedef NeighborSearch<NearestNeighborSort, metric::EuclideanDistance>
     AllkNN;
 @endcode
 
@@ -292,7 +292,7 @@ arguments:
 @code
 template<
   typename SortPolicy = NearestNeighborSort,
-  typename MetricType = mlpack::metric::SquaredEuclideanDistance,
+  typename MetricType = mlpack::metric::EuclideanDistance,
   typename TreeType = mlpack::tree::BinarySpaceTree<bound::HRectBound<2>,
                                                     QueryStat<SortPolicy> >
 >
@@ -370,7 +370,7 @@ rectangular bound:
 // Construct a NeighborSearch object with ball bounds.
 NeighborSearch<
   NearestNeighborSort,
-  metric::SquaredEuclideanDistance,
+  metric::EuclideanDistance,
   tree::BinarySpaceTree<bound::BallBound<2>,
                         QueryStat<SortPolicy> >
 > neighborSearch(dataset);



More information about the mlpack-git mailing list