This is a Python implementation to find the closest pair of points in a three-dimensional space using divide and conquer algorithm.
The program takes two inputs: the number of points to be generated, and the number of dimensions of the points.
After clicking Start, the program finds the closest pair of points with divide-and-conquer algorithm and brute-force algorithm. After both algorithms done executing, the program compares said algorithms based on the number of Euclidean distance operations and the execution time.
Data visualization is also implemented, but only if the number of dimensions is three.
- Python 3.11.2
- Required packages as specified
in
requirements.txt
βββ doc # Contains report for the project
βββ src # Contains source code for the program
...
-
Download this repository as a ZIP file and extract it
-
Open your terminal in the root directory of the project
-
Activate the virtual environment in which you want to install packages
-
Install required packages using
pip
pip install -r requirements.txt
-
Run
main.py
usingpython
from the root directorypython src/main.py
-
Input the number of points and the number of dimensions
-
Click Start