This program is used for building two structures to find nearsest neighbors in C++. The first structure (1) is implementing the LSH algorithm for vectors in the d-dimensional space based on the Euclidean metric and Cosine similarity. The second one (2) is implementing the random projection method at the HyperCube, which is based on LSH functions for Euclidean distance and for Cosine similarity.
How to run (using terminal):
LSH:
./lsh -d <input file> -q <query file> -k <int> -L <int> -o <output file>
HyperCube:
./cube -d <input file> -q <query file> -k <int> -M <int> -probes <int> -o <output file>