tasks
Class TSPRoot

java.lang.Object
  extended by api.Task
      extended by tasks.TSPRoot
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Task>

public class TSPRoot
extends Task

Initial TSP task class. Generates TSPTasks that start their tour at city 0.

See Also:
Serialized Form

Constructor Summary
TSPRoot(int numCities, double[][] coords)
          Constructor for TSPRoot class
 
Method Summary
 Result execute()
          Execute method for TSPRoot.
 boolean executeOnServer()
          Method for checking whether this task should execute on the server
 
Methods inherited from class api.Task
compareTo, getShared, getSuccessorId, getSuccessorInputIndex, getTaskId, sendEvent, setComputer, updateShared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSPRoot

public TSPRoot(int numCities,
               double[][] coords)
Constructor for TSPRoot class

Parameters:
coords -
numCities - the number of cities
Method Detail

executeOnServer

public boolean executeOnServer()
Description copied from class: Task
Method for checking whether this task should execute on the server

Specified by:
executeOnServer in class Task
Returns:

execute

public Result execute()
Execute method for TSPRoot. Generates TSPTasks that start their tour at city 0.

Specified by:
execute in class Task
Returns:
Container with TSPTasks and TSPMin successor.