Package com.jgalgo.io
Interface GraphWriter<V,E>
-
- Type Parameters:
V
- the vertices typeE
- 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:
GraphReader
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods 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 Detail
-
writeGraph
void writeGraph(Graph<V,E> graph, Writer writer)
Write a graph to an I/O writer.- Parameters:
graph
- a graphwriter
- 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 graphfile
- 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 graphpath
- a path to a file to which the graph will be written to- Throws:
UncheckedIOException
- if an I/O error occurs
-
-