Skip to content

haidarhamda/Nearest-Pair-Point-DnC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Program Description

A program to find the closest pair of points in an n-dimensional space R^n using a divide and conquer approach.

Requirement

  • Ruby versi 3.0.4p208 or higher
  • gnuplot

How to Run the Program:

  1. Make sure Ruby is installed on your computer. If Ruby is not installed, you can install it by following the steps here
  2. Also, ensure that Gnuplot is installed on your computer. If not, you can install it by following the steps here
  3. Open the terminal in the src folder
  4. Run the command gem install gnuplot
  5. Run the command ruby main.rb

How to Use:

  1. First, the user will be prompted to enter a number representing the desired number of points to be generated.
  2. The user will be asked to enter a number representing the dimension.
  3. The program will display the closest pair of points along with their distance and also show a plot if the dimension is 2 or 3.

Author

Haidar Hamda / 13521105

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages