tsp
Class TSPProblem

java.lang.Object
  extended by tsp.TSPProblem
All Implemented Interfaces:
Problem

public class TSPProblem
extends java.lang.Object
implements Problem

Contains an instance of TSP.

See Also:
Problem

Field Summary
 java.lang.String errorMessage
          This is useful to problem-generating algorithms.
 Pointd[] points
          The list of points.
 java.lang.String topMessage
           
 
Constructor Summary
TSPProblem()
           
 
Method Summary
 java.lang.String getErrorMessage()
          Retrieve error message about an invalid problem.
 void readFromFile(java.io.File f)
          Read the problem in plain text from the given file.
 java.lang.String toString()
          Returns a problem description summary.
 void writeToFile(java.io.File f)
          Write the problem in plain text to the given file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

points

public Pointd[] points
The list of points. Get the number of points from points.length.


errorMessage

public java.lang.String errorMessage
This is useful to problem-generating algorithms. If a problem is improperly generated, an error message is placed here.


topMessage

public java.lang.String topMessage
Constructor Detail

TSPProblem

public TSPProblem()
Method Detail

writeToFile

public void writeToFile(java.io.File f)
Description copied from interface: Problem
Write the problem in plain text to the given file.

Specified by:
writeToFile in interface Problem
Parameters:
f - a File value

readFromFile

public void readFromFile(java.io.File f)
Description copied from interface: Problem
Read the problem in plain text from the given file.

Specified by:
readFromFile in interface Problem
Parameters:
f - a File value

toString

public java.lang.String toString()
Description copied from interface: Problem
Returns a problem description summary.

Specified by:
toString in interface Problem
Overrides:
toString in class java.lang.Object
Returns:
a String value

getErrorMessage

public java.lang.String getErrorMessage()
Description copied from interface: Problem
Retrieve error message about an invalid problem.

Specified by:
getErrorMessage in interface Problem
Returns:
a String value