[mlpack-git] master, mlpack-1.0.x: Actually calculate score and base case for first node combination. (a121aab)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:53:33 EST 2015


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

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

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

commit a121aab21fcf04946d9b5e1e5ffeba07c9119814
Author: Ryan Curtin <ryan at ratml.org>
Date:   Thu Jul 17 15:32:27 2014 +0000

    Actually calculate score and base case for first node combination.


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

a121aab21fcf04946d9b5e1e5ffeba07c9119814
 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);



More information about the mlpack-git mailing list