[mlpack] 192/324: Actually calculate score and base case for first node combination.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:09 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 6c33f70b614b2a164fa2005907c43e6a38cad1be
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Thu Jul 17 15:32:27 2014 +0000

    Actually calculate score and base case for first node combination.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16834 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/tree/cover_tree/dual_tree_traverser_impl.hpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/core/tree/cover_tree/dual_tree_traverser_impl.hpp b/src/mlpack/core/tree/cover_tree/dual_tree_traverser_impl.hpp
index 741e257..45849ab 100644
--- a/src/mlpack/core/tree/cover_tree/dual_tree_traverser_impl.hpp
+++ b/src/mlpack/core/tree/cover_tree/dual_tree_traverser_impl.hpp
@@ -34,8 +34,11 @@ DualTreeTraverser<RuleType>::Traverse(
   DualCoverTreeMapEntry rootRefEntry;
 
   rootRefEntry.referenceNode = &referenceNode;
-  rootRefEntry.score = 0.0; // Must recurse into.
-  rootRefEntry.baseCase = 0.0;
+
+  // Perform the evaluation between the roots of either tree.
+  rootRefEntry.score = rule.Score(queryNode, referenceNode);
+  rootRefEntry.baseCase = rule.BaseCase(queryNode.Point(),
+      referenceNode.Point());
   rootRefEntry.traversalInfo = rule.TraversalInfo();
 
   refMap[referenceNode.Scale()].push_back(rootRefEntry);

-- 
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