|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.uu.cs.treewidth.input.DgfReader
public class DgfReader
A GraphInput
that can read the DIMACS graph file format called DGF.
Can read either from file or a given Reader
.
Specification of the file format can be found in the docs directory of the SVN repository. The code of getInput is also well commented. (TODO Maybe an URL to docs?)
Example usage:
GraphInput input = new DgfReader( "myGraph.dgf" ); NGraph g = null; try { g = input.get(); } catch (InputException e) { ... }
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface nl.uu.cs.treewidth.input.GraphInput |
---|
GraphInput.InputData |
Constructor Summary | |
---|---|
DgfReader(java.io.Reader reader)
Note: |
|
DgfReader(java.lang.String filename)
Note: the file will not be opened immediately, but in get(). |
Method Summary | |
---|---|
NGraph<GraphInput.InputData> |
get()
Return a graph. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DgfReader(java.lang.String filename)
filename
- The file to read.public DgfReader(java.io.Reader reader)
reader
- The Reader to read from.Method Detail |
---|
public NGraph<GraphInput.InputData> get() throws InputException
GraphInput
get
in interface GraphInput
InputException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |