This repository is for MN-RU algorithm. All experiment has implemented in C++ on a PC with Intel Xeon CPU E5-2678 v3 @ 2.50GHz and 110GB memory, running Ubuntu 22.04.
You could reproduce it with the following steps, the overall experiment may take days.
Suppose we are in the root directory of the repo.
apt update && \
apt install -y g++ && \
apt install -y cmake && \
apt install -y build-essential && \
apt install -y make && \
apt install wget && \
apt install zip unzip && \
apt install tar && \
apt install python3 && \
apt install python3-dev python3-pip && \
pip install numpy pandas matplotlib
Our repository contains the results in the ./output
directory and its subdirectories. You can view them directly or run the following command to see the results.
- download datasets
bash ./shell/downloadDatasets.sh
- build the project
bash ./shell/build.sh
- special deal with sift2M
bash ./shell/specialDealWithSift2M.sh
- generate index and groundTruth
bash ./shell/generateIndexAndGroundTruth.sh
- run full_coverage scenario
bash ./shell/runMultWithBuild.sh
- run random scenario
bash ./shell/runRandomWithBuild.sh
- run new_insert scenario
bash ./shell/runNewInsertWithBuild.sh
- run backup
bash ./shell/runBackUp.sh
- Draw the result Figure
bash ./shell/runDrawFigure.sh
After drawing the result figures, you can find them in the ./output
directory and its subdirectories.
- MN-RU α: ./external/hnswlib_method7/hnswlib/hnswalg.h
- MN-RU β: ./external/hnswlib_method8/hnswlib/hnswalg.h
- MN-RU γ: ./external/hnswlib_method9/hnswlib/hnswalg.h
- MN-THN-RU: ./external/hnswlib_method10/hnswlib/hnswalg.h You could just see the core algorithm in function updatePoint and repairConnectionsForUpdate