From 1b1a3fa0e35f0bcd787dc020b291305e2a8fbe47 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Mon, 19 Oct 2015 14:18:10 -0400 Subject: [PATCH] Fix mappings for rvalue reference constructors. --- .../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 5d5e024aef..418c8968a0 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; }