Menu

gml i/o

coding_neo
2012-05-22
2013-05-29
  • coding_neo

    coding_neo - 2012-05-22

    Hello:

    I would like to write a graph to a file in GML. I saw the javadocs and found two methods to accomplish this:

    protected void writeEdgeData(Hypergraph<V,E> g, Writer w)
    protected void writeVertexData(Hypergraph<V,E> graph, BufferedWriter w)

    TO save a graph do I need to call both of them one after the other or just one…and if so which one? I am a bit confused here.

    Also the saving process above needs to generate a valid GML file which I can read again using anyone of the below:
    void load(Reader reader, G g)

    void load(String filename, G g)

    Thanking you in advance for your time:

     
  • Joshua O'Madadhain

    You'll note that those methods are protected, so you can't call them directly from your code.

    Instead, use whichever of the save() methods is appropriate.

    Joshua

     
  • coding_neo

    coding_neo - 2012-05-23

    Joshua:

    Thanks for your advice.
    This issue is resolved.

     

Log in to post a comment.