[mlpack-git] master: Remove unnecesary fill (they will be filled when calling GetResults()). (15ec979)

gitdub at mlpack.org gitdub at mlpack.org
Tue Jul 26 21:22:08 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/ef51b032f275266f781d42b9bd0aa50aa26a3077...8522b04c3d9a82fb7e964bafd72e70f0cd30bf4b

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

commit 15ec97921fb2741dfa8f549201e1899a8a19e3a3
Author: MarcosPividori <marcos.pividori at gmail.com>
Date:   Thu Jul 21 12:53:57 2016 -0300

    Remove unnecesary fill (they will be filled when calling GetResults()).


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

15ec97921fb2741dfa8f549201e1899a8a19e3a3
 src/mlpack/methods/rann/ra_search_impl.hpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/mlpack/methods/rann/ra_search_impl.hpp b/src/mlpack/methods/rann/ra_search_impl.hpp
index 16360b5..6fa366e 100644
--- a/src/mlpack/methods/rann/ra_search_impl.hpp
+++ b/src/mlpack/methods/rann/ra_search_impl.hpp
@@ -354,7 +354,6 @@ Search(const MatType& querySet,
   // Set the size of the neighbor and distance matrices.
   neighborPtr->set_size(k, querySet.n_cols);
   distancePtr->set_size(k, querySet.n_cols);
-  distancePtr->fill(SortPolicy::WorstDistance());
 
   typedef RASearchRules<SortPolicy, MetricType, Tree> RuleType;
 
@@ -526,9 +525,7 @@ void RASearch<SortPolicy, MetricType, MatType, TreeType>::Search(
     neighborPtr = new arma::Mat<size_t>;
 
   neighborPtr->set_size(k, querySet.n_cols);
-  neighborPtr->fill(size_t() - 1);
   distances.set_size(k, querySet.n_cols);
-  distances.fill(SortPolicy::WorstDistance());
 
   // Create the helper object for the tree traversal.
   typedef RASearchRules<SortPolicy, MetricType, Tree> RuleType;
@@ -584,9 +581,7 @@ void RASearch<SortPolicy, MetricType, MatType, TreeType>::Search(
 
   // Initialize results.
   neighborPtr->set_size(k, referenceSet->n_cols);
-  neighborPtr->fill(size_t() - 1);
   distancePtr->set_size(k, referenceSet->n_cols);
-  distancePtr->fill(SortPolicy::WorstDistance());
 
   // Create the helper object for the tree traversal.
   typedef RASearchRules<SortPolicy, MetricType, Tree> RuleType;




More information about the mlpack-git mailing list