org.apache.mahout.ga.watchmaker.travellingsalesman
Interface TravellingSalesmanStrategy

All Known Implementing Classes:
BruteForceTravellingSalesman, EvolutionaryTravellingSalesman

public interface TravellingSalesmanStrategy

Defines methods that must be implemented by classes that provide solutions to the Travelling Salesman problem.
The original code is from the Watchmaker project (https://watchmaker.dev.java.net/).


Method Summary
 List<String> calculateShortestRoute(Collection<String> cities, ProgressListener progressListener)
          Calculates the shortest round trip distance that visits each of the specified cities once and returns to the starting point.
 String getDescription()
           
 

Method Detail

getDescription

String getDescription()
Returns:
A description of the strategy.

calculateShortestRoute

List<String> calculateShortestRoute(Collection<String> cities,
                                    ProgressListener progressListener)
Calculates the shortest round trip distance that visits each of the specified cities once and returns to the starting point.

Parameters:
cities - The destination that must each be visited for the route to be valid.
progressListener - A call-back for keeping track of the route-finding algorithm's progress.
Returns:
The shortest route found for the given list of destinations.


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.