[mlpack-git] master: Use n_slices not size() to fix correctness. (81b6b4f)

gitdub at mlpack.org gitdub at mlpack.org
Wed Jun 1 13:54:24 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/eba4f9924694bc10daec74ff5059dbb8af001416...e3a23c256f017ebb8185b15847c82f51d359cdfd

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

commit 81b6b4f88d93d55e19f8698d4a2e5abe973bed3f
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Jun 1 08:48:04 2016 -0700

    Use n_slices not size() to fix correctness.


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

81b6b4f88d93d55e19f8698d4a2e5abe973bed3f
 src/mlpack/methods/lsh/lsh_search.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/lsh/lsh_search.hpp b/src/mlpack/methods/lsh/lsh_search.hpp
index e7fd98d..89f0f92 100644
--- a/src/mlpack/methods/lsh/lsh_search.hpp
+++ b/src/mlpack/methods/lsh/lsh_search.hpp
@@ -162,7 +162,7 @@ class LSHSearch
   const arma::mat& ReferenceSet() const { return *referenceSet; }
 
   //! Get the number of projections.
-  size_t NumProjections() const { return projections.size(); }
+  size_t NumProjections() const { return projections.n_slices; }
 
   //! Get the offsets 'b' for each of the projections.  (One 'b' per column.)
   const arma::mat& Offsets() const { return offsets; }




More information about the mlpack-git mailing list