- java.lang.Object
-
- org.logicng.graphs.io.GraphDimacsFileWriter
-
public final class GraphDimacsFileWriter extends Object
A dimacs file writer for graphs. Writes the internal data structure of a graph to a dimacs file.- Since:
- 1.2
- Version:
- 2.4.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> voidwrite(String fileName, Graph<T> graph, boolean writeMapping)Writes a given graph's internal data structure as a dimacs file.
-
-
-
Method Detail
-
write
public static <T> void write(String fileName, Graph<T> graph, boolean writeMapping) throws IOException
Writes a given graph's internal data structure as a dimacs file.- Type Parameters:
T- the type of the graph content- Parameters:
fileName- the file name of the dimacs file to write, will be extended by suffix.colif not already presentgraph- the graphwriteMapping- indicates whether an additional file for translating the ids to variable names shall be written- Throws:
IOException- if there was a problem writing the file
-
-