[mlpack-git] master: Update some comments/info. (44b90f2)
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 44b90f2c2565919c73c0870324c3d53ddbf153e0
Author: MarcosPividori <marcos.pividori at gmail.com>
Date: Tue Jun 7 10:51:51 2016 -0300
Update some comments/info.
>---------------------------------------------------------------
44b90f2c2565919c73c0870324c3d53ddbf153e0
.../methods/neighbor_search/neighbor_search_rules_impl.hpp | 4 ++--
src/mlpack/methods/neighbor_search/ns_model_impl.hpp | 10 ++++++----
.../neighbor_search/sort_policies/furthest_neighbor_sort.cpp | 4 ++--
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp b/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
index 6edf103..24f9485 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
@@ -1,8 +1,8 @@
/**
- * @file nearest_neighbor_rules_impl.hpp
+ * @file neighbor_search_rules_impl.hpp
* @author Ryan Curtin
*
- * Implementation of NearestNeighborRules.
+ * Implementation of NeighborSearchRules.
*/
#ifndef MLPACK_METHODS_NEIGHBOR_SEARCH_NEAREST_NEIGHBOR_RULES_IMPL_HPP
#define MLPACK_METHODS_NEIGHBOR_SEARCH_NEAREST_NEIGHBOR_RULES_IMPL_HPP
diff --git a/src/mlpack/methods/neighbor_search/ns_model_impl.hpp b/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
index bbca3d2..0a70562 100644
--- a/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/ns_model_impl.hpp
@@ -416,9 +416,8 @@ void NSModel<SortPolicy>::Search(arma::mat&& querySet,
Log::Info << "Searching for " << k;
if (Epsilon() != 0)
- Log::Info << " approximate nearest neighbors (e=" << Epsilon() << ") with ";
- else
- Log::Info << " nearest neighbors with ";
+ Log::Info << " approximate (e=" << Epsilon() << ")";
+ Log::Info << " neighbors with ";
if (!Naive() && !SingleMode())
Log::Info << "dual-tree " << TreeName() << " search..." << std::endl;
else if (!Naive())
@@ -437,7 +436,10 @@ void NSModel<SortPolicy>::Search(const size_t k,
arma::Mat<size_t>& neighbors,
arma::mat& distances)
{
- Log::Info << "Searching for " << k << " nearest neighbors with ";
+ Log::Info << "Searching for " << k;
+ if (Epsilon() != 0)
+ Log::Info << " approximate (e=" << Epsilon() << ")";
+ Log::Info << " neighbors with ";
if (!Naive() && !SingleMode())
Log::Info << "dual-tree " << TreeName() << " search..." << std::endl;
else if (!Naive())
diff --git a/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.cpp b/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.cpp
index aee4877..f58e4d2 100644
--- a/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.cpp
+++ b/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.cpp
@@ -1,5 +1,5 @@
/***
- * @file nearest_neighbor_sort.cpp
+ * @file furthest_neighbor_sort.cpp
* @author Ryan Curtin
*
* Implementation of the simple FurthestNeighborSort policy class.
@@ -12,7 +12,7 @@ size_t FurthestNeighborSort::SortDistance(const arma::vec& list,
const arma::Col<size_t>& indices,
double newDistance)
{
- // The first element in the list is the nearest neighbor. We only want to
+ // The first element in the list is the furthest neighbor. We only want to
// insert if the new distance is greater than the last element in the list.
if (newDistance < list[list.n_elem - 1])
return (size_t() - 1); // Do not insert.
More information about the mlpack-git
mailing list