Anonymous

Changes

From CMSC 420
544 bytes added ,  17:17, 16 March 2007
clarification on data structures for part 1
Line 2: Line 2:     
(Remember: if you think this page could be better -- you can change it!  Click the "edit" tab up top to get started.)
 
(Remember: if you think this page could be better -- you can change it!  Click the "edit" tab up top to get started.)
 +
 +
== Data Structures ==
 +
 +
There are two main concepts for this project:
 +
# Data Dictionary (TreeMaps and TreeSets for part 1)
 +
#* Related commands:
 +
#** createCity
 +
#** deleteCity
 +
#** listCities
 +
#** clearAll
 +
 +
# Spatial Map (PR Quadtree for part 1)
 +
#* Related commands:
 +
#** deleteCity (if the city is mapped)
 +
#** mapCity
 +
#** unmapCity
 +
#** rangeCities
 +
#** nearestCity
 +
#** saveMap
 +
#** clearAll
 +
 +
An important concept to remember is that the data dictionary is not the same as the spatial map. If you create a city, it is not mapped in the spatial map.
    
== Basic Operations ==
 
== Basic Operations ==
Line 9: Line 31:  
* [[mapCity]] and [[unmapCity]]: These take a city that's already registered in the database and add it to or remove it from the spatial data structure.
 
* [[mapCity]] and [[unmapCity]]: These take a city that's already registered in the database and add it to or remove it from the spatial data structure.
 
* [[listCities]]: Output a sorted (XML) list of cities in the database.
 
* [[listCities]]: Output a sorted (XML) list of cities in the database.
* [[rangeCity]]: This searches the spatial data structure for all cities within a given radius of a given point.
+
* [[rangeCities]]: This searches the spatial data structure for all cities within a given radius of a given point.
 
* [[nearestCity]]: This finds the nearest city to a given point in the spatial map.
 
* [[nearestCity]]: This finds the nearest city to a given point in the spatial map.
 
* [[printPRQuadtree]]: This outputs an XML (textual) representation of the spatial data structure.
 
* [[printPRQuadtree]]: This outputs an XML (textual) representation of the spatial data structure.
103

edits