[mlpack-git] master: Reorder tutorial list. (b067ee4)

gitdub at mlpack.org gitdub at mlpack.org
Thu Aug 18 18:24:50 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/4271e8908e3d991622f5d3891796a465d77ab65e...b067ee4bb6cff16be8efb1ad4923052bc12a13c5

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

commit b067ee4bb6cff16be8efb1ad4923052bc12a13c5
Author: Ryan Curtin <ryan at ratml.org>
Date:   Thu Aug 18 18:24:50 2016 -0400

    Reorder tutorial list.


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

b067ee4bb6cff16be8efb1ad4923052bc12a13c5
 README.md                                                        | 2 +-
 .../neighbor_search/sort_policies/furthest_neighbor_sort.hpp     | 9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 841eca8..d5d1647 100644
--- a/README.md
+++ b/README.md
@@ -71,8 +71,8 @@ If you are compiling Armadillo by hand, ensure that LAPACK and BLAS are enabled.
 4. Building mlpack from source
 ------------------------------
 
-(see also [Building mlpack under Windows](https://github.com/mlpack/mlpack/wiki/WindowsBuild))
 (see also [Building mlpack From Source](http://www.mlpack.org/docs/mlpack-git/doxygen.php?doc=build.html))
+(see also [Building mlpack Under Windows](https://github.com/mlpack/mlpack/wiki/WindowsBuild))
 
 mlpack uses CMake as a build system and allows several flexible build
 configuration options. One can consult any of numerous CMake tutorials for
diff --git a/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp b/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp
index a66c8d1..943bcc5 100644
--- a/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp
+++ b/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp
@@ -152,12 +152,7 @@ class FurthestNeighborSort
    */
   static inline double ConvertToScore(const double distance)
   {
-    if (distance == DBL_MAX)
-      return 0.0;
-    else if (distance == 0.0)
-      return DBL_MAX;
-    else
-      return (1.0 / distance);
+    return DBL_MAX - distance;
   }
 
   /**
@@ -167,7 +162,7 @@ class FurthestNeighborSort
    */
   static inline double ConvertToDistance(const double score)
   {
-    return ConvertToScore(score); // The two operations are identical.
+    return DBL_MAX - score;
   }
 };
 




More information about the mlpack-git mailing list