[mlpack-git] master: Add some accessors to internal LSH fields. (8c514fd)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Nov 20 17:33:32 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/962a37fe8374913c435054aa50e12d912bdfa01c...a7d8231fe7526dcfaadae0bf37d67b50d286e45d

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

commit 8c514fd4796dec7dd8fdb54063dd85616a392725
Author: Ryan Curtin <ryan at ratml.org>
Date:   Fri Nov 20 21:37:38 2015 +0000

    Add some accessors to internal LSH fields.


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

8c514fd4796dec7dd8fdb54063dd85616a392725
 src/mlpack/methods/lsh/lsh_search.hpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/mlpack/methods/lsh/lsh_search.hpp b/src/mlpack/methods/lsh/lsh_search.hpp
index a490e5d..e14b142 100644
--- a/src/mlpack/methods/lsh/lsh_search.hpp
+++ b/src/mlpack/methods/lsh/lsh_search.hpp
@@ -149,6 +149,26 @@ class LSHSearch
   //! Modify the number of distance evaluations performed.
   size_t& DistanceEvaluations() { return distanceEvaluations; }
 
+  //! Return the reference dataset.
+  const arma::mat& ReferenceSet() const { return *referenceSet; }
+
+  //! Get the number of projections.
+  size_t NumProjections() const { return projections.size(); }
+  //! Get the projection matrix of the given table.
+  const arma::mat& Projection(const size_t i) const { return projections[i]; }
+
+  //! Get the offsets 'b' for each of the projections.  (One 'b' per column.)
+  const arma::mat& Offsets() const { return offsets; }
+
+  //! Get the weights of the second hash.
+  const arma::vec& SecondHashWeights() const { return secondHashWeights; }
+
+  //! Get the bucket size of the second hash.
+  size_t BucketSize() const { return bucketSize; }
+
+  //! Get the second hash table.
+  const arma::Mat<size_t>& SecondHashTable() const { return secondHashTable; }
+
  private:
   /**
    * This function builds a hash table with two levels of hashing as presented



More information about the mlpack-git mailing list