CSC234 - Project 6
Location, Location, Location

Assigned April 21th 1 p.m.
Due May 5th 11 a.m.


Overview

Say you're looking for a game store in Shreveport. Your first instinct might be to try a search in Google Maps on your Smart Phone or use a GPS.

We would like to efficiently search this space for nearby locations. The naive way to do this would be to walk through a list of objects and sort them based on their distance from the starting location, but with 1,000,000 entries, this is prohibitive.

In this project, you will implement a version of proximity search using a QuadTree and a Heap. A QuadTree is a two-dimensional version of a Binary Tree, such that instead of a left and a right, there is a NW, NE, SW and SE child. The particular version we will implement is called a PR (Point Region) QuadTree. Each child is exactly 1/4 of the size of it's parent.

To implement our QuadTree and proximity search, we will need a number of smaller instantiable objects. Each object should have the usual accessor and mutator methods for each data member, and a toString and equals method. Feel free to add other objects and methods you see fit to complete this project.

Point

First, we create a Point object.

Data Members

Methods

ProxDist implements Comparable<ProxDist>

Next, we define the superclass ProxDist, which will be the parent of Location and QuadNode. This class implements the Comparable interface.

Data Members

Methods

Location extends ProxDist

The Location object represents unique locations on the map, as well as the location of interest to the proximity search.

Data Members

Methods

QuadNode extends ProxDist

The QuadNode implements similar methods to the BinaryNode class discussed in class.

Data Members

Methods

QuadTree

A full QuadTree should have an add and a remove method. The key method of the QuadTree for us is the proximitySearch algorithm.

Data Members

Methods

What to turn in

  1. Point.java
  2. ProxDist.java
  3. Location.java
  4. QuadNode.java
  5. QuadTree.java
  6. Heap.java
Hand in your Project 6 files on the cs.centenary.edu server in a directory named project6.
© Mark Goadrich 2010, Centenary College of Louisiana