Function ADS::closestPairSweep
Defined in File ClosestPair.h
Function Documentation
-
inline std::pair<std::pair<std::size_t, std::size_t>, std::int64_t> ADS::closestPairSweep(const std::vector<Point> &P)
the same by the sweep on the points sorted by x, closestPair() when the sweep takes too long; a pair of the least distance, not always the one of closestPair()
- Pre:
n >= 2, | x | and | y | at most 10^9
- Post:
the square of the distance of P[ i ] and P[ j ]