java.lang.Objectgd.GDProblem
public class GDProblem
Represents an instance of the Graph Drawing problem.
Problem
Field Summary | |
---|---|
java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> |
adjList
The adjacency list of the (undirected) graph. |
java.lang.String |
errorMessage
If an error is found in the problem, a message is written here. |
double |
maxX
maxX and maxY are the limits of the drawing area in the first quadrant. |
double |
maxY
|
double |
minAngleSeparation
The minimum angle required between two adjacent edges. |
double |
minPointSeparation
The minimum distance required between points. |
int |
numNodes
# nodes in graph. |
java.lang.String |
topMessage
|
Constructor Summary | |
---|---|
GDProblem()
|
|
GDProblem(int numNodes)
Creates a new GDProblem instance. |
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 int numNodes
public double maxX
public double maxY
public double minPointSeparation
public double minAngleSeparation
public java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> adjList
public java.lang.String errorMessage
public java.lang.String topMessage
Constructor Detail |
---|
public GDProblem(int numNodes)
GDProblem
instance.
numNodes
- an int
valuepublic GDProblem()
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