[mlpack-git] master: Update tests to consider SpillKNN. (b1530ea)

gitdub at mlpack.org gitdub at mlpack.org
Thu Aug 18 11:13:21 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/0f4b25acd6aaa14294c044874ba6cc0751712baa...0a19d07bd39e6223991976474bc79671ba8aa0f0

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

commit b1530ea3733b98042e7c11ec0c3a366341ff21a2
Author: MarcosPividori <marcos.pividori at gmail.com>
Date:   Thu Aug 18 12:09:15 2016 -0300

    Update tests to consider SpillKNN.


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

b1530ea3733b98042e7c11ec0c3a366341ff21a2
 src/mlpack/tests/knn_test.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/tests/knn_test.cpp b/src/mlpack/tests/knn_test.cpp
index b6d6876..0271ed3 100644
--- a/src/mlpack/tests/knn_test.cpp
+++ b/src/mlpack/tests/knn_test.cpp
@@ -913,8 +913,8 @@ BOOST_AUTO_TEST_CASE(HybridSpillSearchTest)
   // If we are sure that tau is a valid strict upper bound of the kth nearest
   // neighbor of the query points, then we can be sure that we will get an exact
   // solution.
-  SpillSearch<> spTreeSearch(dataset, false, true,
-      maxDist * 1.01 /* tau parameter */);
+  SpillKNN::Tree referenceTree(dataset, maxDist * 1.01 /* tau parameter */);
+  SpillKNN spTreeSearch(&referenceTree);
 
   for (size_t mode = 0; mode < 2; mode++)
   {
@@ -947,7 +947,9 @@ BOOST_AUTO_TEST_CASE(DuplicatedSpillSearchTest)
   {
     double tau = test * 0.1;
 
-    SpillSearch<> spTreeSearch(dataset, false, false, tau);
+    SpillKNN::Tree referenceTree(dataset, tau);
+    SpillKNN spTreeSearch(&referenceTree);
+
     arma::Mat<size_t> neighborsSPTree;
     arma::mat distancesSPTree;
 




More information about the mlpack-git mailing list