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:
  1. README file containing assignment and solution descriptions, e.g., program design, description of algorithm, etc., if appropriate.
  2. INSTALL file containing any specific compliation quirks peculiar to your program, e.g.,
    Compilation: make -f Makefile.eertdk.
  3. 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.
  4. src/ directory with source code.

Description:
  1. 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.)

  2. 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.

  3. Sample output can be found here: eertdk.out.