[mlpack] 131/324: Fix constructor calls, and automatically construct a cover tree with the default RASearch constructor.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:03 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 9c213ed4f0a86ee14d68694634839e72aef10975
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Mon Jul 7 13:10:44 2014 +0000

    Fix constructor calls, and automatically construct a cover tree with the default
    RASearch constructor.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16770 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/tests/allkrann_search_test.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mlpack/tests/allkrann_search_test.cpp b/src/mlpack/tests/allkrann_search_test.cpp
index 67eb8eb..76da72b 100644
--- a/src/mlpack/tests/allkrann_search_test.cpp
+++ b/src/mlpack/tests/allkrann_search_test.cpp
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(SingleTreeSearch)
   arma::Mat<size_t> neighbors;
   arma::mat distances;
 
-  RASearch<> tssRann(refData, queryData, false, true, 5);
+  RASearch<> tssRann(refData, queryData, false, true);
 
   // The relative ranks for the given query reference pair
   arma::Mat<size_t> qrRanks;
@@ -177,7 +177,7 @@ BOOST_AUTO_TEST_CASE(SingleTreeSearch)
 
   for (size_t rounds = 0; rounds < numRounds; rounds++)
   {
-    tssRann.Search(1, neighbors, distances, 1.0, 0.95, false, false, 5);
+    tssRann.Search(1, neighbors, distances, 1.0, 0.95, false, false);
 
     for (size_t i = 0; i < queryData.n_cols; i++)
       if (qrRanks(i, neighbors(0, i)) < expectedRankErrorUB)
@@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(DualTreeSearch)
   arma::Mat<size_t> neighbors;
   arma::mat distances;
 
-  RASearch<> tsdRann(refData, queryData, false, false, 5);
+  RASearch<> tsdRann(refData, queryData, false, false);
 
   arma::Mat<size_t> qrRanks;
   data::Load("rann_test_qr_ranks.csv", qrRanks, true, false); // No transpose.
@@ -344,8 +344,7 @@ BOOST_AUTO_TEST_CASE(SingleCoverTreeTest)
   typedef RASearch<NearestNeighborSort, metric::EuclideanDistance, TreeType>
       RACoverTreeSearch;
 
-  TreeType refTree(refData);
-  RACoverTreeSearch tssRann(&refTree, NULL, refData, queryData, true);
+  RACoverTreeSearch tssRann(refData, queryData, true);
 
   // The relative ranks for the given query reference pair.
   arma::Mat<size_t> qrRanks;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list