The polygonal maps in the name of the PM1 quadtree are essentially finite graphs (edges and vertices), which we will call loci (plural of locus) and tracks. They are stored in the PM1 quadtree to support identification of the closest track to a given point in 2-space. Note that this is a major change from Part 2; so, to lessen the impact of the change, we are maintaining the same definition of sites as in Part 2, but treating them as a special case of the more general locus However, the method of capturing vertex-edge relationships in the PM1 is not appropriate for finding the shortest set of edges between two vertices, or other applications that explore the connections between a vertex and all vertices adjacent to it. So, you will also be implementing adjacency lists to reflect combinations of tracks (edges) that have been inserted into the PM1 quadtree.
There are many ways to implement an adjacency list-just
an array of arrays or the simple matrix that you may have learned in the
lower level courses! You can do a skiplist of skiplists, or a TreeMap of
TreeMaps, or any
number of various objects which provide the right traversal capabilities.
The principal requirement for this project is that insert and search for
the loci connected to a specific locus must be in
.
Regardless of the implementation of the adjacency list, its purpose is to provide us with a quick and easy way to perform shortest track calculations so we will be able to produce full SoftWar functionality in part 4.