[mlpack-git] master: Move constructor to header, to avoid linking problems (MonoSearchVisitor is not a template class). (fd33fd5)
gitdub at mlpack.org
gitdub at mlpack.org
Wed Jun 22 14:09:07 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/a9f5622c8a14409111f2d71bf5c0f8aaa8ad4ae1...37fda23945b4f998cd5fa6ec011ae345236c8552
>---------------------------------------------------------------
commit fd33fd5ca64fb9f6a82168dc259e66fcec55ae4b
Author: MarcosPividori <marcos.pividori at gmail.com>
Date: Wed Jun 22 14:33:26 2016 -0300
Move constructor to header, to avoid linking problems (MonoSearchVisitor is not a template class).
>---------------------------------------------------------------
fd33fd5ca64fb9f6a82168dc259e66fcec55ae4b
src/mlpack/methods/neighbor_search/ns_model.hpp | 6 +++++-
src/mlpack/methods/neighbor_search/ns_model_impl.hpp | 9 ---------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/mlpack/methods/neighbor_search/ns_model.hpp b/src/mlpack/methods/neighbor_search/ns_model.hpp
index db3331a..711d640 100644
--- a/src/mlpack/methods/neighbor_search/ns_model.hpp
+++ b/src/mlpack/methods/neighbor_search/ns_model.hpp
@@ -69,7 +69,11 @@ class MonoSearchVisitor : public boost::static_visitor<void>
MonoSearchVisitor(const size_t k,
arma::Mat<size_t>& neighbors,
- arma::mat& distances);
+ arma::mat& distances) :
+ k(k),
+ neighbors(neighbors),
+ distances(distances)
+ {};
};
/**
diff --git a/src/mlpack/methods/neighbor_search/ns_model_impl.hpp b/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
index 075306b..da8ab07 100644
--- a/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
@@ -18,15 +18,6 @@
namespace mlpack {
namespace neighbor {
-//! Save parameters for monochromatic neighbor search.
-MonoSearchVisitor::MonoSearchVisitor(const size_t k,
- arma::Mat<size_t>& neighbors,
- arma::mat& distances) :
- k(k),
- neighbors(neighbors),
- distances(distances)
-{}
-
//! Monochromatic neighbor search on the given NSType instance.
template<typename NSType>
void MonoSearchVisitor::operator()(NSType *ns) const
More information about the mlpack-git
mailing list