cage.embedder
Class IO
java.lang.Object
cage.embedder.IO
public class IO
- extends java.lang.Object
|
Constructor Summary |
IO(java.lang.String input,
int graphStartRows,
int graphStartColumns)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IO
public IO(java.lang.String input,
int graphStartRows,
int graphStartColumns)
findNextGraph
public int findNextGraph()
- Searches the next graph in the input string. If a graph is found, the amount of vertices
is returned and the vertices can be requested with
getCurrentGraph().
If the input code contained coordinates for the vertices, they can be requested with
getGraphCoords().
- Returns:
- the amount of vertices in the graph just found or 0 if no graph is found.
printGraph
public void printGraph(java.io.PrintStream output)
- Print out the graph in writegraph format
- Parameters:
output - the stream to print the graph on
getCurrentGraph
public int[][] getCurrentGraph()
getDimension
public int getDimension()
getGraphCoords
public double[][] getGraphCoords()
- Returns:
- the graphCoords
getNumberOfVertices
public int getNumberOfVertices()
- Returns:
- the number of vertices in last graph