[mlpack-git] master: Remove unnecessary check; that can never happen. (37436c3)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 12 16:02:47 EDT 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/eddd7167d69b6c88b271ef2e51d1c20e13f1acd8...70342dd8e5c17e0c164cfb8189748671e9c0dd44

>---------------------------------------------------------------

commit 37436c33c968debdc41c09a3a3e4f9f79872e889
Author: Ryan Curtin <ryan at ratml.org>
Date:   Tue Jan 13 17:01:09 2015 -0500

    Remove unnecessary check; that can never happen.


>---------------------------------------------------------------

37436c33c968debdc41c09a3a3e4f9f79872e889
 src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp b/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp
index a3236d8..f3e006c 100644
--- a/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp
+++ b/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp
@@ -135,8 +135,7 @@ double DualTreeKMeansRules<MetricType, TreeType>::Score(
     ++distanceCalculations;
     score = PellegMooreScore(queryNode, referenceNode, minDistance);
 
-    if (minDistance < referenceNode.Stat().MinQueryNodeDistance() ||
-        referenceNode.Stat().ClosestQueryNode() == NULL)
+    if (minDistance < referenceNode.Stat().MinQueryNodeDistance())
     {
       const double maxDistance = referenceNode.MaxDistance(&queryNode);
       ++distanceCalculations;



More information about the mlpack-git mailing list