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

Class cmp

code/data-structures/kd_tree.cpp:11–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 rep(i,0,K) sum += pow(coord[i] - other.coord[i], 2.0);
10 return sqrt(sum); } };
11 struct cmp {
12 int c;
13 cmp(int _c) : c(_c) {}
14 bool operator ()(const pt &a, const pt &b) const {
15 for (int i = 0, cc; i <= K; i++) {
16 cc = i == 0 ? c : i - 1;
17 if (abs(a.coord[cc] - b.coord[cc]) > EPS)
18 return a.coord[cc] < b.coord[cc];
19 }
20 return false; } };
21 struct bb {
22 pt from, to;
23 bb(pt _from, pt _to) : from(_from), to(_to) {}

Callers 7

constructMethod · 0.70
_conMethod · 0.70
_insMethod · 0.70
_nnMethod · 0.70
swimMethod · 0.70
sinkMethod · 0.70
heapifyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected