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

Method _con

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

Source from the content-addressed store, hash-verified

53 construct(pts, mid + 1, to, INC(c))); }
54 bool contains(const pt &p) { return _con(p, root, 0); }
55 bool _con(const pt &p, node *n, int c) {
56 if (!n) return false;
57 if (cmp(c)(p, n->p)) return _con(p, n->l, INC(c));
58 if (cmp(c)(n->p, p)) return _con(p, n->r, INC(c));
59 return true; }
60 void insert(const pt &p) { _ins(p, root, 0); }
61 void _ins(const pt &p, node* &n, int c) {
62 if (!n) n = new node(p, NULL, NULL);

Callers

nothing calls this directly

Calls 1

cmpClass · 0.70

Tested by

no test coverage detected