tasks
Class TSPMin

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

public class TSPMin
extends Successor

TSPMin class

See Also:
Serialized Form

Constructor Summary
TSPMin(TaskId taskId, TaskId successorId, int successorInputIndex, int inputCount, double[][] coords)
          Constructor for TSPMin class
 
Method Summary
 Result execute()
          Finds the minimum distance path among the task inputs
 boolean executeOnServer()
          Method for checking whether this task should execute on the server
 
Methods inherited from class api.Successor
getInput, getInputSize, hasAllInput, setInput
 
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

TSPMin

public TSPMin(TaskId taskId,
              TaskId successorId,
              int successorInputIndex,
              int inputCount,
              double[][] coords)
Constructor for TSPMin class

Parameters:
coords -
taskId - the task id
successorId - the successor task id
successorInputIndex - the input index of the successor
inputCount - the number of inputs to the min task
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()
Finds the minimum distance path among the task inputs

Specified by:
execute in class Task
Returns:
a Container with a Result storing a TSPResult