[mlpack-git] master: Add more documentation for NeighborSearchRules. (9b03a96)
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 9b03a968285e466e38fd85399fdc3da0edfbafbe
Author: MarcosPividori <marcos.pividori at gmail.com>
Date: Thu Jul 21 11:08:22 2016 -0300
Add more documentation for NeighborSearchRules.
>---------------------------------------------------------------
9b03a968285e466e38fd85399fdc3da0edfbafbe
.../neighbor_search/neighbor_search_rules.hpp | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/mlpack/methods/neighbor_search/neighbor_search_rules.hpp b/src/mlpack/methods/neighbor_search/neighbor_search_rules.hpp
index 0bcdc49..8dead33 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search_rules.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search_rules.hpp
@@ -15,10 +15,33 @@
namespace mlpack {
namespace neighbor {
+/**
+ * The NeighborSearchRules class is a template helper class used by
+ * NeighborSearch class when performing distance-based neighbor searches. For
+ * each point in the query dataset, it keeps track of the k neighbors in the
+ * reference dataset which have the 'best' distance according to a given sorting
+ * policy.
+ *
+ * @tparam SortPolicy The sort policy for distances.
+ * @tparam MetricType The metric to use for computation.
+ * @tparam TreeType The tree type to use; must adhere to the TreeType API.
+ */
template<typename SortPolicy, typename MetricType, typename TreeType>
class NeighborSearchRules
{
public:
+ /**
+ * Construct the NeighborSearchRules object. This is usually done from within
+ * the NeighborSearch class at search time.
+ *
+ * @param referenceSet Set of reference data.
+ * @param querySet Set of query data.
+ * @param k Number of neighbors to search for.
+ * @param metric Instantiated metric.
+ * @param epsilon Relative approximate error.
+ * @param sameSet If true, the query and reference set are taken to be the
+ * same, and a query point will not return itself in the results.
+ */
NeighborSearchRules(const typename TreeType::Mat& referenceSet,
const typename TreeType::Mat& querySet,
const size_t k,
More information about the mlpack-git
mailing list