org.apache.mahout.ga.watchmaker.travellingsalesman
Interface DistanceLookup
- All Known Implementing Classes:
- EuropeanDistanceLookup
public interface DistanceLookup
Strategy interface for providing distances between cities in the Travelling Salesman problem.
The original code is from the Watchmaker project (https://watchmaker.dev.java.net/).
Method Summary |
int |
getDistance(java.lang.String startingCity,
java.lang.String destinationCity)
Looks-up the distance between two cities. |
java.util.List<java.lang.String> |
getKnownCities()
|
getKnownCities
java.util.List<java.lang.String> getKnownCities()
- Returns:
- The list of cities that this object knows about.
getDistance
int getDistance(java.lang.String startingCity,
java.lang.String destinationCity)
- Looks-up the distance between two cities.
- Parameters:
startingCity
- The city to start from.destinationCity
- The city to end in.
- Returns:
- The distance (in kilometres) between the two cities.
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.