[mlpack-git] master: Fix casting error. (852571a)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Mon Oct 19 16:04:34 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/09cd0d67f2fdae252a8ab85324e71dbb4dfe0010...fecf1194c123ced12d56e7daad761c7b9aaac262

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

commit 852571af23c4032e8549c0e80837ba95a146ee68
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Oct 19 11:05:26 2015 -0400

    Fix casting error.


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

852571af23c4032e8549c0e80837ba95a146ee68
 src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 9420110..5d5e024 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
@@ -133,7 +133,7 @@ BinarySpaceTree(MatType&& data, const size_t maxLeafSize) :
     count(data.n_cols),
     bound(data.n_rows),
     parentDistance(0), // Parent distance for the root is 0: it has no parent.
-    dataset(std::move(data))
+    dataset(new MatType(std::move(data)))
 {
   // Do the actual splitting of this node.
   SplitType<BoundType<MetricType>, MatType> splitter;
@@ -161,7 +161,7 @@ BinarySpaceTree(
     count(data.n_cols),
     bound(data.n_rows),
     parentDistance(0), // Parent distance for the root is 0: it has no parent.
-    dataset(std::move(data))
+    dataset(new MatType(std::move(data)))
 {
   // Initialize oldFromNew correctly.
   oldFromNew.resize(data.n_cols);
@@ -195,7 +195,7 @@ BinarySpaceTree(
     count(data.n_cols),
     bound(data.n_rows),
     parentDistance(0), // Parent distance for the root is 0: it has no parent.
-    dataset(std::move(data))
+    dataset(new MatType(std::move(data)))
 {
   // Initialize the oldFromNew vector correctly.
   oldFromNew.resize(data.n_cols);



More information about the mlpack-git mailing list