org.apache.mahout.ga.watchmaker.travellingsalesman
Class EuropeanDistanceLookup

java.lang.Object
  extended by org.apache.mahout.ga.watchmaker.travellingsalesman.EuropeanDistanceLookup
All Implemented Interfaces:
DistanceLookup

public final class EuropeanDistanceLookup
extends java.lang.Object
implements DistanceLookup

This class contains data about cities in Europe and the distances between them.
The original code is from the Watchmaker project (https://watchmaker.dev.java.net/).


Constructor Summary
EuropeanDistanceLookup()
           
 
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuropeanDistanceLookup

public EuropeanDistanceLookup()
Method Detail

getKnownCities

public java.util.List<java.lang.String> getKnownCities()
Specified by:
getKnownCities in interface DistanceLookup
Returns:
The list of cities that this object knows about.

getDistance

public int getDistance(java.lang.String startingCity,
                       java.lang.String destinationCity)
Description copied from interface: DistanceLookup
Looks-up the distance between two cities.

Specified by:
getDistance in interface DistanceLookup
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.