org.sat4j.reader
Class InstanceReader
java.lang.Object
org.sat4j.reader.InstanceReader
- All Implemented Interfaces:
- Reader
public class InstanceReader
- extends java.lang.Object
- implements Reader
An reader having the responsability to choose the right reader according to
the input.
- Author:
- leberre
Method Summary |
java.lang.String |
decode(int[] model)
Produce a model using the reader format. |
IProblem |
parseInstance(java.lang.String filename)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstanceReader
public InstanceReader(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
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.