Package com.jgalgo.io

Interface GraphWriter<V,E>

Type Parameters:
V - the vertices type
E - the edges type
All Known Implementing Classes:
Digraph6GraphWriter, DimacsGraphWriter, GexfGraphWriter, GmlGraphWriter, Graph6GraphWriter, GraphMlGraphWriter, LedaGraphWriter, Sparse6GraphWriter

public interface GraphWriter<V,E>
A writer that writes Graphs to files/IO-writer.
Author:
Barak Ugav
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    writeGraph(Graph<V,E> graph, File file)
    Write a graph to a file.
    void
    writeGraph(Graph<V,E> graph, Writer writer)
    Write a graph to an I/O writer.
    default void
    writeGraph(Graph<V,E> graph, String path)
    Write a graph to a file, given its path.
  • Method Details

    • writeGraph

      void writeGraph(Graph<V,E> graph, Writer writer)
      Write a graph to an I/O writer.
      Parameters:
      graph - a graph
      writer - an I/O writer to which the graph description will be written to
      Throws:
      UncheckedIOException - if an I/O error occurs
    • writeGraph

      default void writeGraph(Graph<V,E> graph, File file)
      Write a graph to a file.
      Parameters:
      graph - a graph
      file - a file descriptor to which the graph will be written to
      Throws:
      UncheckedIOException - if an I/O error occurs
    • writeGraph

      default void writeGraph(Graph<V,E> graph, String path)
      Write a graph to a file, given its path.
      Parameters:
      graph - a graph
      path - a path to a file to which the graph will be written to
      Throws:
      UncheckedIOException - if an I/O error occurs