tasks
Class EuclideanTspResult
java.lang.Object
api.Result
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
Method Summary |
double |
getDistance()
Gets the length of the specified path. |
int[] |
getValue()
Gets the answer. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
-
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.