[mlpack-git] master: Adds code that gives controllable access to LSH projection tables (f3c4939)
gitdub at mlpack.org
gitdub at mlpack.org
Tue May 31 16:17:13 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/eba4f9924694bc10daec74ff5059dbb8af001416...e3a23c256f017ebb8185b15847c82f51d359cdfd
>---------------------------------------------------------------
commit f3c4939e58eccff3f25f5ba399dcb96a04dee066
Author: Yannis Mentekidis <mentekid at gmail.com>
Date: Tue May 31 23:17:13 2016 +0300
Adds code that gives controllable access to LSH projection tables
>---------------------------------------------------------------
f3c4939e58eccff3f25f5ba399dcb96a04dee066
src/mlpack/methods/lsh/lsh_search_impl.hpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/methods/lsh/lsh_search_impl.hpp b/src/mlpack/methods/lsh/lsh_search_impl.hpp
index 119eb78..7986c07 100644
--- a/src/mlpack/methods/lsh/lsh_search_impl.hpp
+++ b/src/mlpack/methods/lsh/lsh_search_impl.hpp
@@ -437,16 +437,14 @@ void LSHSearch<SortPolicy>::BuildHash(const std::vector<arma::mat> &projection)
}
else //user-specified projection tables
{
- //TODO: check that projection.size() == numTables
-
projMat = projection[i];
//make sure specified matrix is of correct size
- if (projMat.n_rows != referenceSet->n_rows)
+ if ( projMat.n_rows != referenceSet->n_rows )
throw std::invalid_argument(
"projection table dimensionality doesn't"
" equal dataset dimensionality" );
- if (projMat.n_cols != numProj)
+ if ( projMat.n_cols != numProj )
throw std::invalid_argument(
"projection table doesn't have correct number of projections");
}
More information about the mlpack-git
mailing list