|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectspanReform.SpanReform
public class SpanReform
Class for generating a map of cities from a constraint file.
Nested Class Summary | |
---|---|
private class |
SpanReform.City
Class for stroing the name and location of a city. |
Field Summary | |
---|---|
private java.util.HashMap<java.lang.String,SpanReform.City> |
cities
a mapping of city names to the cities |
(package private) static java.util.HashMap<java.lang.String,double[]> |
displacements
a mapping of distance names to the spatial displacements |
private java.util.HashSet<java.lang.String> |
relations
the relations between the cities |
Constructor Summary | |
---|---|
SpanReform()
|
Method Summary | |
---|---|
private void |
addCity(java.lang.String city1,
java.lang.String city2,
java.lang.String direction,
boolean move)
Adds the given cities to the map. |
Map |
generateMap(java.lang.String goalFile,
MapImporter importer)
Generates a map relating cities from the specified goal file. |
static void |
main(java.lang.String[] args)
Test main for generating a span reform map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static java.util.HashMap<java.lang.String,double[]> displacements
private java.util.HashMap<java.lang.String,SpanReform.City> cities
private java.util.HashSet<java.lang.String> relations
Constructor Detail |
---|
public SpanReform()
Method Detail |
---|
public static void main(java.lang.String[] args)
public Map generateMap(java.lang.String goalFile, MapImporter importer)
goalFile
- - the spatial constraintsimporter
- - the map importer
private void addCity(java.lang.String city1, java.lang.String city2, java.lang.String direction, boolean move)
city1
- - the first citycity2
- - the second citydirection
- - the relation between the citiesmove
- - specifies if the relation value should be used to
determine the location of the cities
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |