distanceFunction.io
Class GraphWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.OutputStreamWriter
          extended by java.io.FileWriter
              extended by distanceFunction.io.GraphWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

 class GraphWriter
extends java.io.FileWriter

Author:
Sepp Hartung

Field Summary
private  DistanceFunction distanceFunction
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
GraphWriter(DistanceFunction distanceFunction, java.io.File file)
           
 
Method Summary
 void beginGraph()
           
 void endGraph()
           
protected static char getChar(int i)
           
 void writeDistanceFunction(java.lang.String filePath, DistanceFunction distance)
           
 void writeEdge(int i, int j, float edgeLength)
           
 void writeEdge(java.lang.String i, java.lang.String j, java.lang.String label, float eLength)
           
 void writeVertex(java.lang.String string)
           
 
Methods inherited from class java.io.OutputStreamWriter
close, flush, getEncoding, write, write, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

distanceFunction

private final DistanceFunction distanceFunction
Constructor Detail

GraphWriter

public GraphWriter(DistanceFunction distanceFunction,
                   java.io.File file)
            throws java.lang.SecurityException,
                   java.io.IOException
Throws:
java.lang.SecurityException
java.io.IOException
Method Detail

getChar

protected static char getChar(int i)

beginGraph

public void beginGraph()

endGraph

public void endGraph()

writeDistanceFunction

public void writeDistanceFunction(java.lang.String filePath,
                                  DistanceFunction distance)

writeEdge

public void writeEdge(int i,
                      int j,
                      float edgeLength)
               throws java.io.IOException
Throws:
java.io.IOException

writeEdge

public void writeEdge(java.lang.String i,
                      java.lang.String j,
                      java.lang.String label,
                      float eLength)
               throws java.io.IOException
Throws:
java.io.IOException

writeVertex

public void writeVertex(java.lang.String string)
                 throws java.io.IOException
Throws:
java.io.IOException