[mlpack-svn] r10761 - mlpack/trunk/src/mlpack/methods/neighbor_search
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Dec 14 03:04:14 EST 2011
Author: rcurtin
Date: 2011-12-14 03:04:13 -0500 (Wed, 14 Dec 2011)
New Revision: 10761
Modified:
mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp
Log:
New Statistic API.
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp 2011-12-14 08:04:08 UTC (rev 10760)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp 2011-12-14 08:04:13 UTC (rev 10761)
@@ -40,6 +40,24 @@
*/
QueryStat() : bound(SortPolicy::WorstDistance()) { }
+ /**
+ * Initialization for a leaf, required by the StatisticType policy.
+ */
+ template<typename MatType>
+ QueryStat(const MatType& dataset, const size_t begin, const size_t count)
+ : bound(SortPolicy::WorstDistance()) { }
+
+ /**
+ * Initialization for a node, required by the StatisticType policy.
+ */
+ template<typename MatType>
+ QueryStat(const MatType& dataset,
+ const size_t begin,
+ const size_t count,
+ const QueryStat& leftStat,
+ const QueryStat& rightStat)
+ : bound(SortPolicy::WorstDistance()) { }
+
//! Get the bound.
const double Bound() const { return bound; }
//! Modify the bound.
More information about the mlpack-svn
mailing list