[mlpack-git] master: This appears to be a failed merge; fix it. (405bf73)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Sun Oct 11 16:26:12 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/7e6fe3f1c25445dfd41c747839aa1fbf1c31a776...6e9a7465d7739e05e6b4aa650e1f87c45e9cd656

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

commit 405bf738264f59503c00998c66b970059905567a
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Oct 5 13:25:11 2015 -0400

    This appears to be a failed merge; fix it.


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

405bf738264f59503c00998c66b970059905567a
 .../core/tree/binary_space_tree/binary_space_tree_impl.hpp   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
index f75070e..8e0571c 100644
--- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
@@ -197,6 +197,18 @@ BinarySpaceTree(
     parentDistance(0), // Parent distance for the root is 0: it has no parent.
     dataset(std::move(data))
 {
+  // Initialize the oldFromNew vector correctly.
+  oldFromNew.resize(data.n_cols);
+  for (size_t i = 0; i < data.n_cols; i++)
+    oldFromNew[i] = i; // Fill with unharmed indices.
+
+  // Now do the actual splitting.
+  SplitType<BoundType<MetricType>, MatType> splitter;
+  SplitNode(oldFromNew, maxLeafSize, splitter);
+
+  // Create the statistic depending on if we are a leaf or not.
+  stat = StatisticType(*this);
+
   // Map the newFromOld indices correctly.
   newFromOld.resize(data.n_cols);
   for (size_t i = 0; i < data.n_cols; i++)



More information about the mlpack-git mailing list