Skip to content

Latest commit

 

History

History

README.md

Closest Pair

The program implements an algorithm to compute the closest pair of points in a point-set.

The algorithm inputs the coordinates of the points in the point-set from a text whose format matches the txt files uploaded, and output:

(1) the coordinates of a closest pair in the point-set.

(2) the distance between the two points in the closest pair.


The code files contain:

PointsSet ---- class to store and manipulate a set of points.

ComparatorX ---- comparator to sort points according to x.

ComparatorY ---- comparator to sort points according to y.

ClosestPairTest ---- test driver to compute the pair of points.