[mlpack-git] master: Fix mappings for rvalue reference constructors. (1b1a3fa)

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


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

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

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

commit 1b1a3fa0e35f0bcd787dc020b291305e2a8fbe47
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Oct 19 14:18:10 2015 -0400

    Fix mappings for rvalue reference constructors.


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

1b1a3fa0e35f0bcd787dc020b291305e2a8fbe47
 .../core/tree/binary_space_tree/binary_space_tree_impl.hpp   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 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 5d5e024..418c896 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
@@ -164,8 +164,8 @@ BinarySpaceTree(
     dataset(new MatType(std::move(data)))
 {
   // Initialize oldFromNew correctly.
-  oldFromNew.resize(data.n_cols);
-  for (size_t i = 0; i < data.n_cols; i++)
+  oldFromNew.resize(dataset->n_cols);
+  for (size_t i = 0; i < dataset->n_cols; i++)
     oldFromNew[i] = i; // Fill with unharmed indices.
 
   // Now do the actual splitting.
@@ -198,8 +198,8 @@ BinarySpaceTree(
     dataset(new MatType(std::move(data)))
 {
   // Initialize the oldFromNew vector correctly.
-  oldFromNew.resize(data.n_cols);
-  for (size_t i = 0; i < data.n_cols; i++)
+  oldFromNew.resize(dataset->n_cols);
+  for (size_t i = 0; i < dataset->n_cols; i++)
     oldFromNew[i] = i; // Fill with unharmed indices.
 
   // Now do the actual splitting.
@@ -210,8 +210,8 @@ BinarySpaceTree(
   stat = StatisticType(*this);
 
   // Map the newFromOld indices correctly.
-  newFromOld.resize(data.n_cols);
-  for (size_t i = 0; i < data.n_cols; i++)
+  newFromOld.resize(dataset->n_cols);
+  for (size_t i = 0; i < dataset->n_cols; i++)
     newFromOld[oldFromNew[i]] = i;
 }
 



More information about the mlpack-git mailing list