[mlpack-svn] r16344 - mlpack/trunk/src/mlpack/methods/neighbor_search
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Sat Mar 1 14:38:11 EST 2014
Author: rcurtin
Date: Sat Mar 1 14:38:10 2014
New Revision: 16344
Log:
Remove numberOfPrunes variable, and initialize baseCase (#336).
Modified:
mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp
mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp (original)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search.hpp Sat Mar 1 14:38:10 2014
@@ -230,9 +230,6 @@
std::vector<size_t> oldFromNewReferences;
//! Permutations of query points during tree building.
std::vector<size_t> oldFromNewQueries;
-
- //! Total number of pruned nodes during the neighbor search.
- size_t numberOfPrunes;
}; // class NeighborSearch
}; // namespace neighbor
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp (original)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp Sat Mar 1 14:38:10 2014
@@ -34,8 +34,7 @@
hasQuerySet(true),
naive(naive),
singleMode(!naive && singleMode), // No single mode if naive.
- metric(metric),
- numberOfPrunes(0)
+ metric(metric)
{
// C++11 will allow us to call out to other constructors so we can avoid this
// copypasta problem.
@@ -75,8 +74,7 @@
hasQuerySet(false),
naive(naive),
singleMode(!naive && singleMode), // No single mode if naive.
- metric(metric),
- numberOfPrunes(0)
+ metric(metric)
{
// We'll time tree building, but only if we are building trees.
Timer::Start("tree_building");
@@ -111,8 +109,7 @@
hasQuerySet(true),
naive(false),
singleMode(singleMode),
- metric(metric),
- numberOfPrunes(0)
+ metric(metric)
{
// Nothing else to initialize.
}
@@ -132,8 +129,7 @@
hasQuerySet(false), // In this case we will own a tree, if singleMode.
naive(false),
singleMode(singleMode),
- metric(metric),
- numberOfPrunes(0)
+ metric(metric)
{
Timer::Start("tree_building");
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp (original)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/neighbor_search_rules_impl.hpp Sat Mar 1 14:38:10 2014
@@ -85,7 +85,7 @@
{
// The first point in the tree is the centroid. So we can then calculate
// the base case between that and the query point.
- double baseCase;
+ double baseCase = -1.0;
if (tree::TreeTraits<TreeType>::HasSelfChildren)
{
// If the parent node is the same, then we have already calculated the
More information about the mlpack-svn
mailing list