[mlpack-git] master: - Fix of sparse iteration (8d26bb6)

gitdub at mlpack.org gitdub at mlpack.org
Wed Oct 19 15:36:06 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/94d14187222231ca29e4f6419c5999c660db4f8a...981ffa2d67d8fe38df6c699589005835fef710ea

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

commit 8d26bb6b177ebaa9d2375705243df4ed837f4f19
Author: theJonan <ivan at jonan.info>
Date:   Wed Oct 19 22:36:06 2016 +0300

    - Fix of sparse iteration


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

8d26bb6b177ebaa9d2375705243df4ed837f4f19
 src/mlpack/methods/det/dtree_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/det/dtree_impl.hpp b/src/mlpack/methods/det/dtree_impl.hpp
index f14961e..4c1b9f3 100644
--- a/src/mlpack/methods/det/dtree_impl.hpp
+++ b/src/mlpack/methods/det/dtree_impl.hpp
@@ -74,7 +74,7 @@ namespace details
     std::vector<ElemType> valsVec;
     valsVec.reserve(n_elem);
     
-    for (RowIterator j(data, dim, start);j.col() < end; ++j)
+    for (RowIterator j(data, dim, start);j.row() == dim && j.col() < end; ++j)
       valsVec.push_back(*j);
     
     // ... and sort it!




More information about the mlpack-git mailing list