Commit 6f10ad68 authored by Julien Jerphanion's avatar Julien Jerphanion

Remove unused datastructure and debugging

parent 1538c72a
......@@ -128,9 +128,6 @@ cdef cypclass KDTree:
I_t d # number of dimensions / features
I_t depth # max_depth of the tree (to be unified with leaf_size)
np.ndarray data_arr
np.ndarray idx_array_arr
active Node root
D_t *data_ptr
......@@ -179,13 +176,7 @@ cdef cypclass KDTree:
depth, n_dims=d, dim=0, start=0, end=n)
scheduler.finish()
del scheduler
for i in range(n):
printf("X[indices[%d] = %d]= %f %f\n",
i, self.indices_ptr[i],
self.data_ptr[self.indices_ptr[i] * d],
self.data_ptr[self.indices_ptr[i] * d + 1])
void __dealloc__(self):
printf("Deallocating KDTree datastructures\n")
......@@ -196,7 +187,5 @@ cdef cypclass KDTree:
cdef public int main() nogil:
# Entry point for the compiled binary file
printf("main: called\n")
tree = KDTree()
printf("main: done\n")
printf("empty public int main() nogil:")
return 0
......@@ -2,10 +2,11 @@ import numpy as np
import kdtree
if __name__ == "__main__":
n, d = 24, 2
n, d = 1000000, 2
golden_ratio = (1 + 5 ** 0.5) / 2
X = np.zeros((n, d))
for i in range(n):
X[i, 0] = (i / golden_ratio) % 1
X[i, 1] = i / n
tree = kdtree.KDTree(X, depth=10)
del tree
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment