MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / cmpy

Class cmpy

code/geometry/closest_pair.cpp:7–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5 return abs(real(a) - real(b)) > EPS ?
6 real(a) < real(b) : imag(a) < imag(b); } };
7struct cmpy { bool operator ()(const point &a,
8 const point &b) const {
9 return abs(imag(a) - imag(b)) > EPS ?
10 imag(a) < imag(b) : real(a) < real(b); } };
11double closest_pair(vector<point> pts) {
12 sort(pts.begin(), pts.end(), cmpx());
13 set<point, cmpy> cur;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected