[mlpack] 101/324: commit to ease debugging
Barak A. Pearlmutter
barak+git at cs.nuim.ie
Sun Aug 17 08:22:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit f92d5325ba684945aad161f6af2f30fb75ba9fc1
Author: andrewmw94 <andrewmw94 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Wed Jul 2 18:36:35 2014 +0000
commit to ease debugging
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16739 9d5b8971-822b-0410-80eb-d18c1038ef23
---
.../core/tree/rectangle_tree/single_tree_traverser_impl.hpp | 6 +++++-
src/mlpack/methods/neighbor_search/allknn_main.cpp | 9 +--------
src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp | 7 ++++++-
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/mlpack/core/tree/rectangle_tree/single_tree_traverser_impl.hpp b/src/mlpack/core/tree/rectangle_tree/single_tree_traverser_impl.hpp
index f6adc20..ef4e071 100644
--- a/src/mlpack/core/tree/rectangle_tree/single_tree_traverser_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/single_tree_traverser_impl.hpp
@@ -26,7 +26,9 @@ RectangleTree<SplitType, DescentType, StatisticType, MatType>::
SingleTreeTraverser<RuleType>::SingleTreeTraverser(RuleType& rule) :
rule(rule),
numPrunes(0)
-{ /* Nothing to do */ }
+{
+ std::cout << "constructing traverser" << std::endl;
+ /* Nothing to do */ }
template<typename SplitType,
typename DescentType,
@@ -39,6 +41,8 @@ SingleTreeTraverser<RuleType>::Traverse(
const RectangleTree<SplitType, DescentType, StatisticType, MatType>&
referenceNode)
{
+ std::cout << "traversing" << std::endl;
+
// If we reach a leaf node, we need to run the base case.
if(referenceNode.IsLeaf()) {
for(size_t i = 0; i < referenceNode.Count(); i++) {
diff --git a/src/mlpack/methods/neighbor_search/allknn_main.cpp b/src/mlpack/methods/neighbor_search/allknn_main.cpp
index b4dc0cf..f55ccbc 100644
--- a/src/mlpack/methods/neighbor_search/allknn_main.cpp
+++ b/src/mlpack/methods/neighbor_search/allknn_main.cpp
@@ -295,7 +295,7 @@ int main(int argc, char *argv[])
queryTree = NULL; // Empty for now.
Timer::Stop("tree_building");
-
+
if (CLI::GetParam<string>("query_file") != "")
{
Log::Info << "Loaded query data from '" << queryFile << "' ("
@@ -328,13 +328,6 @@ int main(int argc, char *argv[])
delete allknn;
-
-
- // Build the reference tree.
- Log::Info << "Building reference tree..." << endl;
- Timer::Start("tree_building");
-
- Timer::Stop("tree_building");
}
}
else // Cover trees.
diff --git a/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp b/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
index bcada1f..1ff8a2e 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search_impl.hpp
@@ -252,6 +252,8 @@ void NeighborSearch<SortPolicy, MetricType, TreeType>::Search(
}
else if (singleMode)
{
+
+ std::cout << " we are in NeighborSearchImpl" << std::endl;
// The search doesn't work if the root node is also a leaf node.
// if this is the case, it is suggested that you use the naive method.
assert(!(referenceTree->IsLeaf()));
@@ -259,11 +261,14 @@ void NeighborSearch<SortPolicy, MetricType, TreeType>::Search(
// Create the traverser.
typename TreeType::template SingleTreeTraverser<RuleType> traverser(rules);
+ std::cout << " n_cols = " << querySet.n_cols << std::endl;
+
+
// Now have it traverse for each point.
for (size_t i = 0; i < querySet.n_cols; ++i)
traverser.Traverse(i, *referenceTree);
}
- else // Dual-tree recursion.
+ else // Dual-tree recursion.referenceTree
{
// Create the traverser.
typename TreeType::template DualTreeTraverser<RuleType> traverser(rules);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list