org.sat4j.reader
Class GoodOPBReader
java.lang.Object
org.sat4j.reader.GoodOPBReader
- All Implemented Interfaces:
- java.io.Serializable, Reader
public class GoodOPBReader
- extends java.lang.Object
- implements Reader, java.io.Serializable
This class is a quick hack to read opb formatted files. The reader skip
commented lines (beginning with COMMENT_SYMBOL) and expect constraints of the
form: [name :] [[+|-]COEF] [*] [+|-]LIT >=|<=|= DEGREE where COEF and DEGREE
are plain integer and LIT is an identifier.
- Author:
- leberre
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GoodOPBReader
public GoodOPBReader(ISolver solver)
parseInstance
public IProblem parseInstance(java.lang.String filename)
throws java.io.FileNotFoundException,
ParseFormatException,
java.io.IOException,
ContradictionException
- Specified by:
parseInstance
in interface Reader
- Throws:
java.io.FileNotFoundException
ParseFormatException
java.io.IOException
ContradictionException
parseInstance
public void parseInstance(java.io.LineNumberReader in)
throws ContradictionException,
java.io.IOException
- Throws:
ContradictionException
java.io.IOException
decode
public java.lang.String decode(int[] model)
- Description copied from interface:
Reader
- Produce a model using the reader format.
- Specified by:
decode
in interface Reader
- Parameters:
model
- a model using the Dimacs format.
- Returns:
- a human readable view of the model.