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

Method kd_tree

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

kd_tree() : root(NULL) { }

Source from the content-addressed store, hash-verified

42 node *root;
43 // kd_tree() : root(NULL) { }
44 kd_tree(vector<pt> pts) {
45 root = construct(pts, 0, (int)size(pts) - 1, 0); }
46 node* construct(vector<pt> &pts, int from, int to, int c) {
47 if (from > to) return NULL;
48 int mid = from + (to - from) / 2;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected