summaryrefslogtreecommitdiffstats
path: root/kd-forest.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-08-07 16:14:01 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-08-07 16:14:01 -0400
commitf4481d9956fa8e3f3022bedaea07a37c02ad6b22 (patch)
tree5532df423a3cf74332f94a108e740eed70d4499f /kd-forest.h
parent1865067cbbb02c3bb5c27cee18d134cc19bbe0b3 (diff)
downloadkd-forest-f4481d9956fa8e3f3022bedaea07a37c02ad6b22.tar.xz
Support average selection.
Diffstat (limited to 'kd-forest.h')
-rw-r--r--kd-forest.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/kd-forest.h b/kd-forest.h
index 10756a2..3651bfe 100644
--- a/kd-forest.h
+++ b/kd-forest.h
@@ -26,14 +26,14 @@ typedef struct kd_node_t {
struct kd_node_t *left, *right;
// Used to keep track of which sub-tree a node is in during construction
bool is_left;
- // State flags
- bool added, removed;
+ // Weak delete support
+ bool removed;
// Corresponding image position for this node
unsigned int x, y;
} kd_node_t;
-void kd_node_init(kd_node_t *node, unsigned int x, unsigned int y);
+kd_node_t *new_kd_node(double coords[KD_DIMEN], unsigned int x, unsigned int y);
// A forest of k-d trees
typedef struct {