java.lang.Objecttsp.TSPProblem
public class TSPProblem
Contains an instance of TSP.
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 |
---|
public Pointd[] points
points.length
.
public java.lang.String errorMessage
public java.lang.String topMessage
Constructor Detail |
---|
public TSPProblem()
Method Detail |
---|
public void writeToFile(java.io.File f)
Problem
writeToFile
in interface Problem
f
- a File
valuepublic void readFromFile(java.io.File f)
Problem
readFromFile
in interface Problem
f
- a File
valuepublic java.lang.String toString()
Problem
toString
in interface Problem
toString
in class java.lang.Object
String
valuepublic java.lang.String getErrorMessage()
Problem
getErrorMessage
in interface Problem
String
value