[mlpack-git] master: Fix SpillTree's move constructor (f778e8e)

gitdub at mlpack.org gitdub at mlpack.org
Thu Aug 18 13:39:26 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/0f4b25acd6aaa14294c044874ba6cc0751712baa...0a19d07bd39e6223991976474bc79671ba8aa0f0

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

commit f778e8ebd1f49edc87848d93ccef194e83401c11
Author: MarcosPividori <marcos.pividori at gmail.com>
Date:   Mon Aug 1 13:03:59 2016 -0300

    Fix SpillTree's move constructor


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

f778e8ebd1f49edc87848d93ccef194e83401c11
 src/mlpack/core/tree/spill_tree/spill_tree_impl.hpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mlpack/core/tree/spill_tree/spill_tree_impl.hpp b/src/mlpack/core/tree/spill_tree/spill_tree_impl.hpp
index b4b6557..e2f0f93 100644
--- a/src/mlpack/core/tree/spill_tree/spill_tree_impl.hpp
+++ b/src/mlpack/core/tree/spill_tree/spill_tree_impl.hpp
@@ -219,6 +219,12 @@ SpillTree(SpillTree&& other) :
   other.minimumBoundDistance = 0.0;
   other.dataset = NULL;
   other.localDataset = false;
+
+  //Set new parent.
+  if (left)
+    left->parent = this;
+  if (right)
+    right->parent = this;
 }
 
 /**




More information about the mlpack-git mailing list