- java.lang.Object
-
- org.logicng.io.writers.FormulaDimacsFileWriter
-
public final class FormulaDimacsFileWriter extends Object
A dimacs file writer for a formula. Writes the internal data structure of the formula 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 voidwrite(String fileName, Formula formula, boolean writeMapping)Writes a given formula's internal data structure as a dimacs file.
-
-
-
Method Detail
-
write
public static void write(String fileName, Formula formula, boolean writeMapping) throws IOException
Writes a given formula's internal data structure as a dimacs file. Must only be called with a formula which is in CNF.- Parameters:
fileName- the file name of the dimacs file to write, will be extended by suffix.cnfif not already presentformula- the formula in CNFwriteMapping- indicates whether an additional file for translating the ids to variable names shall be written- Throws:
IOException- if there was a problem writing the fileIllegalArgumentException- if the formula was not in CNF
-
-