Package com.jgalgo.io
Interface GraphReader<V,E>
- Type Parameters:
V- the vertices typeE- the edges type
- All Known Implementing Classes:
Digraph6GraphReader,DimacsGraphReader,GexfGraphReader,GmlGraphReader,Graph6GraphReader,GraphMlGraphReader,LedaGraphReader,Sparse6GraphReader
public interface GraphReader<V,E>
A reader that reads Graphs from files/IO-reader.
- Author:
- Barak Ugav
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRead a graph from a file.Read a graph from an I/O reader.Read a graph from a file, given a path to it.readIntoBuilder(Reader reader) Read a graph from an I/O reader into aGraphBuilder.
-
Method Details
-
readGraph
Read a graph from an I/O reader.- Parameters:
reader- an I/O reader that contain a graph description- Returns:
- a new graph read from the reader
- Throws:
UncheckedIOException- if an I/O error occurs
-
readGraph
Read a graph from a file.- Parameters:
file- a file that contain a graph description- Returns:
- a new graph read from the file
- Throws:
UncheckedIOException- if an I/O error occurs
-
readGraph
Read a graph from a file, given a path to it.- Parameters:
path- a path to a file that contain a graph description- Returns:
- a new graph read from the file
- Throws:
UncheckedIOException- if an I/O error occurs
-
readIntoBuilder
Read a graph from an I/O reader into aGraphBuilder.- Parameters:
reader- an I/O reader that contain a graph description- Returns:
- a graph builder containing the vertices and edge read from the reader
- Throws:
UncheckedIOException- if an I/O error occurs
-