Load with ./main filename.csv (file must be in csv format)
to print the whole tree (not recommended for large trees) run:
show tree
to print the root value run:
show root
to print tree size run:
show size
Given a point p in format (x,y,z) (for 3d points) to find k nearest neighbors run:
nn k (x,y,z)
for 3 nearest neighbors of (5,1,2) run:
nn 3 (5,1,2)
input point dimensions must match with point dimensions of tree
To search points that lie between (x1,y1,z1) and (x2,y2,z2) run:
search range (x1,y1,z1) (x2,y2,z2)
To delete points that lie between (x1,y1,z1) and (x2,y2,z2) run:
delete range (x1,y1,z1) (x2,y2,z2)
A point (x,y,z) lies between (x1,y1,z1) and (x2,y2,z2) if x1<x<x2, y1<y<y2, and z1<z<z2
using _ in place of a number relaxes the constraint
running:
range (x1,,z1) (x2,,z2)
this shows points (x,y,z) such that x1<x<x2 and z1<z<z2 with no constraint on the y coordinate
running:
range range (x1,_,z1) (x2,y2,z2)
this shows points (x,y,z) such that x1<x<x2, z1<z<z2 and y<y2
n = number of datapoints
dim = datapoint dimension
range = range of datapoint coordinate from 0 to range
filename = use .csv filename