Function ADS::closestPair
Defined in File ClosestPair.h
Function Documentation
-
inline std::pair<std::pair<std::size_t, std::size_t>, std::int64_t> ADS::closestPair(const std::vector<Point> &P)
closestPair(): the places i < j of the two closest points of P and the square of their distance, by divide et impera; O( n log n )
- Pre:
n >= 2, | x | and | y | at most 10^9
- Post:
the square of the distance of P[ i ] and P[ j ]