Efficient nearest-neighbour search over high-dimensional data, offering two approaches:
- Brute-Force KNN: Examines every data point to find the nearest neighbours.
- Tree-Based KNN: Utilizes KD-Tree and Random Projection Tree indexes for faster lookup.
- DataVector ADT: Dynamically resizable vectors with essential operations.
- VectorDataset: Manages collections of
DataVectorinstances.
-
Clone the repository:
git clone https://github.com/hadwikp/nearest_neighbour_search.git cd nearest_neighbour_search -
Unzip the dataset files into the project root.
-
Compile the code:
# Brute-Force search executable g++ DataVector.cpp VectorDataset.cpp nearest_neighbour.cpp -o brute_force_demo # Tree-based search executable g++ DataVector.cpp VectorDataset.cpp TreeIndex.cpp nearest_neighbour1.cpp -o tree_search_demo
Contributions are welcome! Please open issues or pull requests for new features or fixes.