[mlpack-git] master: Avoid uninitialized owner field. (727714e)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 12 16:02:00 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/eddd7167d69b6c88b271ef2e51d1c20e13f1acd8...70342dd8e5c17e0c164cfb8189748671e9c0dd44
>---------------------------------------------------------------
commit 727714ea11f60eb58a6606634628286e8c8200d5
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Jan 20 18:00:06 2015 -0500
Avoid uninitialized owner field.
>---------------------------------------------------------------
727714ea11f60eb58a6606634628286e8c8200d5
src/mlpack/methods/kmeans/dual_tree_kmeans_statistic.hpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mlpack/methods/kmeans/dual_tree_kmeans_statistic.hpp b/src/mlpack/methods/kmeans/dual_tree_kmeans_statistic.hpp
index 66f1508..87e4368 100644
--- a/src/mlpack/methods/kmeans/dual_tree_kmeans_statistic.hpp
+++ b/src/mlpack/methods/kmeans/dual_tree_kmeans_statistic.hpp
@@ -21,8 +21,10 @@ class DualTreeKMeansStatistic
minQueryNodeDistance(DBL_MAX),
maxQueryNodeDistance(DBL_MAX),
secondClosestBound(DBL_MAX),
+ hamerlyPruned(false),
clustersPruned(size_t(-1)),
iteration(size_t() - 1),
+ owner(size_t(-1)),
firstBound(DBL_MAX),
secondBound(DBL_MAX),
bound(DBL_MAX),
@@ -66,6 +68,11 @@ class DualTreeKMeansStatistic
//! Modify the lower bound on the second closest cluster distance.
double& SecondClosestBound() { return secondClosestBound; }
+ //! Get whether or not this node is Hamerly pruned this iteration.
+ bool HamerlyPruned() const { return hamerlyPruned; }
+ //! Modify whether or not this node is Hamerly pruned this iteration.
+ bool& HamerlyPruned() { return hamerlyPruned; }
+
//! Get the number of clusters that have been pruned during this iteration.
size_t ClustersPruned() const { return clustersPruned; }
//! Modify the number of clusters that have been pruned during this iteration.
@@ -116,6 +123,8 @@ class DualTreeKMeansStatistic
double maxQueryNodeDistance;
//! A lower bound on the distance to the second closest cluster.
double secondClosestBound;
+ //! Whether or not this node is pruned for the next iteration.
+ bool hamerlyPruned;
//! The number of clusters that have been pruned.
size_t clustersPruned;
More information about the mlpack-git
mailing list