|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--taxisrus.implementation.Mapper
| Constructor Summary | |
Mapper()
Default constructor, used for testing. |
|
Mapper(DataStoreConnection dataStore)
Constructor for creating a connection to a database. |
|
Mapper(GPS upper,
GPS lower,
ArrayList polygonlist)
Another constructor for testing |
|
| Method Summary | |
GPS |
address2gps(String convaddress)
Convert address to GPS coordinate by calling HornerHash() and then hash2GPS() Conversion is repeatable for any given address. |
int |
address2zone(String convaddress)
Convert address to zone, via two function calls |
ArrayList |
createzonelist()
For unit testing only. |
ArrayList |
getNeighboringZones(int zoneID)
Return a list of neighboring zone indices for a given zone index |
int |
getNumZones()
Return the number of zones. |
ArrayList |
getZones()
Return an address. |
int |
gps2zone(GPS g)
Convert GPS to zone, if the GPS coordinate is not in any zone, will return nearest zone. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Mapper()
public Mapper(DataStoreConnection dataStore)
initialized - DataStoreConnection object
public Mapper(GPS upper,
GPS lower,
ArrayList polygonlist)
| Method Detail |
public GPS address2gps(String convaddress)
address2gps in interface MapperInterfaceaddress - to be convertedpublic int address2zone(String convaddress)
address2zone in interface MapperInterfaceString - - Address to be convertedpublic int gps2zone(GPS g)
gps2zone in interface MapperInterfaceGPS - to be convertedpublic ArrayList getZones()
getZones in interface MapperInterfacepublic int getNumZones()
getNumZones in interface MapperInterfacepublic ArrayList getNeighboringZones(int zoneID)
getNeighboringZones in interface MapperInterfaceint - zoneIDpublic ArrayList createzonelist()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||