CPSC 212
(Data Structures and Algorithms)
Assignment 3
- Objectives:
- To create a simple 2D kd-tree class, implement NN and k-NN queries.
- Due date:
- 09/28/06
- What to hand in:
- Code "tarball" (e.g.,
asg3.tar.gz
) including:
README
file containing assignment and solution
descriptions, e.g., program design, description of algorithm,
etc., if appropriate.
INSTALL
file containing any specific compliation
quirks peculiar to your program, e.g.,
Compilation: make -f Makefile.eertdk
.
USAGE
file containing any specific usage quirks
peculiar to your program, e.g.,
Usage: ./eertdk < points.in
where
./eertdk
is the executable and
points.in
is the input.
src/
directory with source code.
- Description:
- Implement a 2D KDTree class, with functionality suggested
in the
kdtree.h interface.
(You are free to rewrite the class interface and
declare your own KDTree class, so long as it satisfies
the required funcionality requirements.)
- Your class must be able to kd-tree construction (insertion),
NN and k-NN queries, as suggested in the
eertdk.cpp driver.
Make sure you have a good destructor so that you don't
create memory leaks.
- Sample output can be found here:
eertdk.out.