java.lang.Object
fr.univartois.cril.jkahypar.tools.HypergraphParser
- All Implemented Interfaces:
Closeable,AutoCloseable
The HypergraphParser allows to parse a file in the hMetis format so as to read a
Hypergraph instance.-
Constructor Summary
ConstructorsConstructorDescriptionHypergraphParser(InputStream stream) Creates a new HypergraphParser.HypergraphParser(String inputFile) Creates a new HypergraphParser. -
Method Summary
-
Constructor Details
-
HypergraphParser
Creates a new HypergraphParser.- Parameters:
inputFile- The path of the input file to read the hypergraph from.- Throws:
IOException- If an I/O error occurs while opening the file.
-
HypergraphParser
Creates a new HypergraphParser.- Parameters:
stream- The input stream to read the hypergraph from.
-
-
Method Details
-
parse
Parses the input stream to read a hypergraph instance.- Throws:
IOException- If an I/O error occurs while reading.
-
getHypergraph
Gives the hypergraph that has been read from the associated input stream.- Returns:
- The hypergraph that has been read.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-