[mlpack-git] master: Adapt to new NeighborSearch API. (e06ce8f)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Apr 29 15:00:52 EDT 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/182d4a629c1b23f683dff7b284844e4e3e9f5cc4...e06ce8f3ac1170108c20c114e82cae10356d1301

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

commit e06ce8f3ac1170108c20c114e82cae10356d1301
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Apr 29 14:58:19 2015 -0400

    Adapt to new NeighborSearch API.


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

e06ce8f3ac1170108c20c114e82cae10356d1301
 src/mlpack/methods/mean_shift/mean_shift_impl.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/methods/mean_shift/mean_shift_impl.hpp b/src/mlpack/methods/mean_shift/mean_shift_impl.hpp
index b3d3b2f..596b325 100644
--- a/src/mlpack/methods/mean_shift/mean_shift_impl.hpp
+++ b/src/mlpack/methods/mean_shift/mean_shift_impl.hpp
@@ -246,10 +246,10 @@ inline void MeanShift<UseKernel, KernelType, MatType>::Cluster(
   }
   
   // Assign centroids to each point
-  neighbor::AllkNN neighborSearcher(centroids, data);
+  neighbor::AllkNN neighborSearcher(centroids);
   arma::mat neighborDistances;
   arma::Mat<size_t> resultingNeighbors;
-  neighborSearcher.Search(1, resultingNeighbors, neighborDistances);
+  neighborSearcher.Search(data, 1, resultingNeighbors, neighborDistances);
   assignments = resultingNeighbors.t();
 }
 



More information about the mlpack-git mailing list