|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbcds.phison.io.GraphReader<V,E>
bcds.phison.io.SgfGraphReader<V,E>
public class SgfGraphReader<V extends GraphIONode,E>
Reads a topology file in .sgf format.
The format is described in detail here.
| Constructor Summary | |
|---|---|
SgfGraphReader(java.lang.String fname,
SimGraph<V,E> g)
Creates a SgfGraphReader so that a later call to run() will
populate the graph g from the file named fname. |
|
| Method Summary | |
|---|---|
void |
run()
Reads the file and populates the SimGraph g and the
maps corresponding to edge or node pair attributes. |
| Methods inherited from class bcds.phison.io.GraphReader |
|---|
getIdToNodeMap, getNode, markEdgeAttr, markNodePairAttr, raiseBadFormatEx, setInputStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SgfGraphReader(java.lang.String fname,
SimGraph<V,E> g)
run() will
populate the graph g from the file named fname.
Beware that this class cannot read from "-" (that is, stdin/System.in) because rewind is necessary to make multiple passes on the file, and stdin does not support that operation.
AnyException - wrapping an IOException if
opening fname for reading fails for any reason.| Method Detail |
|---|
public void run()
g and the
maps corresponding to edge or node pair attributes.
run in class GraphReader<V extends GraphIONode,E>BadFormatException - if there is a syntactic error, or
if a value cannot be converted to number.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||