tasks
Class EuclideanTspResult

java.lang.Object
  extended by api.Result
      extended by tasks.EuclideanTspResult
All Implemented Interfaces:
ResultInterface, java.io.Serializable

public class EuclideanTspResult
extends Result

Holds the resulting values from a TSP problem

Author:
Diana Abbas, Ryan Neal
See Also:
Serialized Form

Constructor Summary
EuclideanTspResult(int dID)
           
EuclideanTspResult(int[] answer, double dist, int dID)
          Constructor, copies in the answer and time to compute.
 
Method Summary
 double getDistance()
          Gets the length of the specified path.
 int[] getValue()
          Gets the answer.
 
Methods inherited from class api.Result
getDrainID, getRunTime, setRunTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuclideanTspResult

public EuclideanTspResult(int dID)

EuclideanTspResult

public EuclideanTspResult(int[] answer,
                          double dist,
                          int dID)
Constructor, copies in the answer and time to compute.

Parameters:
answer -
time -
tID -
Method Detail

getValue

public int[] getValue()
Gets the answer.

Specified by:
getValue in interface ResultInterface
Specified by:
getValue in class Result
Returns:
The resulting array telling the order that should be taken through the original path.

getDistance

public double getDistance()
Gets the length of the specified path. specific to only this result.

Returns:
The length of the associated path.