#include <HashTable.h>
|
| HashTable (shared_ptr< MatrixXd > X, double w, int k, std::mt19937_64 &rng) |
|
| HashTable (shared_ptr< MatrixXd > X, double w, int k, vector< pair< int, double >> &samples, std::mt19937_64 &rng) |
|
| HashTable (shared_ptr< MatrixXd > X, double w, int k, vector< pair< int, double >> &samples, std::mt19937_64 &rng, int scales) |
|
vector< HashBucket > | sample (VectorXd query) |
|
◆ HashTable() [1/3]
HashTable::HashTable |
( |
shared_ptr< MatrixXd > |
X, |
|
|
double |
w, |
|
|
int |
k, |
|
|
std::mt19937_64 & |
rng |
|
) |
| |
|
inline |
Construct an LSH table
- Parameters
-
X | dataset |
w | bin wdith |
k | number of hash functions |
rng | |
◆ HashTable() [2/3]
HashTable::HashTable |
( |
shared_ptr< MatrixXd > |
X, |
|
|
double |
w, |
|
|
int |
k, |
|
|
vector< pair< int, double >> & |
samples, |
|
|
std::mt19937_64 & |
rng |
|
) |
| |
|
inline |
Construct an LSH table on from the specified set of weighted samples.
- Parameters
-
X | dataset |
w | bin width |
k | number of hash functions |
samples | a collection of weighted samples; each pair contains the weight and index of the sample |
rng | random number generator |
◆ HashTable() [3/3]
HashTable::HashTable |
( |
shared_ptr< MatrixXd > |
X, |
|
|
double |
w, |
|
|
int |
k, |
|
|
vector< pair< int, double >> & |
samples, |
|
|
std::mt19937_64 & |
rng, |
|
|
int |
scales |
|
) |
| |
|
inline |
Construct an LSH table on from the specified set of weighted samples.
- Parameters
-
X | dataset |
w | bin width |
k | number of hash functions |
samples | a collection of weighted samples; each pair contains the weight and index of the sample |
rng | random number generator |
scales | number of weight scales for each bucket |
◆ sample()
vector<HashBucket> HashTable::sample |
( |
VectorXd |
query | ) |
|
|
inline |
Find hash buckets that the query falls in.
- Parameters
-
- Returns
◆ bucket_count
int HashTable::bucket_count = 0 |
Number of buckets in the hash table
◆ table
unordered_map<size_t, HashBucket> HashTable::table |
The documentation for this class was generated from the following file: