[mlpack-svn] r14374 - mlpack/trunk/src/mlpack/methods/neighbor_search
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Feb 22 18:14:36 EST 2013
Author: rcurtin
Date: 2013-02-22 18:14:36 -0500 (Fri, 22 Feb 2013)
New Revision: 14374
Modified:
mlpack/trunk/src/mlpack/methods/neighbor_search/typedef.hpp
Log:
Don't use L2-squared distance by default.
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/typedef.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/typedef.hpp 2013-02-22 23:14:22 UTC (rev 14373)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/typedef.hpp 2013-02-22 23:14:36 UTC (rev 14374)
@@ -21,22 +21,16 @@
namespace neighbor {
/**
- * The AllkNN class is the all-k-nearest-neighbors method. It returns squared
- * L2 distances (squared Euclidean distances) for each of the k nearest
- * neighbors. Squared distances are used because they are slightly faster than
- * non-squared distances (they have one fewer call to sqrt()).
+ * The AllkNN class is the all-k-nearest-neighbors method. It returns L2
+ * distances (Euclidean distances) for each of the k nearest neighbors.
*/
-typedef NeighborSearch<NearestNeighborSort, metric::SquaredEuclideanDistance>
- AllkNN;
+typedef NeighborSearch<NearestNeighborSort, metric::EuclideanDistance> AllkNN;
/**
- * The AllkFN class is the all-k-furthest-neighbors method. It returns squared
- * L2 distances (squared Euclidean distances) for each of the k furthest
- * neighbors. Squared distances are used because they are slightly faster than
- * non-squared distances (they have one fewer call to sqrt()).
+ * The AllkFN class is the all-k-furthest-neighbors method. It returns L2
+ * distances (Euclidean distances) for each of the k furthest neighbors.
*/
-typedef NeighborSearch<FurthestNeighborSort, metric::SquaredEuclideanDistance>
- AllkFN;
+typedef NeighborSearch<FurthestNeighborSort, metric::EuclideanDistance> AllkFN;
}; // namespace neighbor
}; // namespace mlpack
More information about the mlpack-svn
mailing list